Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Having issue with script running query

Robert Walton August 27, 2020

I am creating a scriptrunner script to query a db table and return a row. How do i access the result row which has only one column in it?

1 answer

0 votes
Dibyandu Roy
Contributor
August 27, 2020

Use return to view it. 

For eg:

def query_output = <syntax and query to be executed on db>

return query_output 

Robert Walton August 28, 2020

Here is my code 

def sSql = "select Grouping from options where Segment = ${sSegment} and Service = ${sService}"
row = sql.firstRow(sSql) { }

Not sure if i got the syntax correct 

Suggest an answer

Log in or Sign up to answer