How to separate the corresponding column value in the scriptdb query statement in google apps script

155 views Asked by At

While I'm retrieving the values from the scriptdb it returns the entire db while using the below coding.

var db = ScriptDb.getMyDb();
var result = db.query({});

While using the following coding it retrieves the corresponding row fully which satisfies the condition.

var db = ScriptDb.getMyDb();
var result = db.query({p_cost:324});

I want to get the specified column value in the specified row which I retrieved already by using the above coding. Is there any possibility to get the specified column value from the scriptdb? We are write the query in traditional database as follows.

SELECE <COL_NAME> FROM <TABLE_NAME>
1

There are 1 answers

0
jrad On

Try this:

while(result.hasnext()){ 

  res = result.next();
  var p_cost = res.p_cost;

}