Yes, if it's at all possible, write the query to return all the information at once, moleboy. You might want to research JOIN in SQL... that will return what you want even if the data comes from two different databases.
If it's not at all possible to do a JOIN (much easier), and you KNOW that the second recordset is always going to have the one column (available), then I would use getRows() to put the data into two arrays, and then combine the arrays.
sorry working from home without access to work SQL server. the queries both are generated from a stored procedure and are both dependent on a single input parameter, nothing else.
the first query is a
select date, code,
case(when x between y return 1 else 0) AS [0-1],
case(when x between y return 1 else 0) AS [1-2],
case(when x between y return 1 else 0) AS [2-3]
From tblsample, tblsample2
where deptid= @deptID
second is
select average
from tblother
where otherdeptid= @deptID
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.