Page 1 of 1

how to get number of records in my query?

Posted: Fri Mar 07, 2014 8:47 am
by snop21
Hello livecoders,

Just wanna ask how to know how to get number of records in my query?

put "Select * from CBMS_Setting" into tSQL
revNumberOfRecords conn, tSQL

I tried my script above but it's wrong.. :(

Thank you

Regards

-snop21

Re: how to get number of records in my query?

Posted: Fri Mar 07, 2014 11:30 am
by bangkok

Code: Select all

  put "Select count(*) from CBMS_Setting" into tSQL
      put revDataFromQuery(,,conn,tSQL) into tNumber
answer tNumber
or

Code: Select all

    put "Select * from CBMS_Setting" into tSQL
      put revDataFromQuery(,,conn,tSQL) into tData
answer the number of lines of tData

Re: how to get number of records in my query?

Posted: Fri Mar 07, 2014 2:20 pm
by splash21
You can also query the number of rows found in the last query;

Code: Select all

SELECT ROW_COUNT()

Re: how to get number of records in my query?

Posted: Sat Mar 08, 2014 3:44 am
by snop21
-Splash21,Bangkok


Thank you for the reply.. :))

Got it.. :))

Regards

-snop21