Re: # of rows in cursor
Posted in 1996
> > How can I get the number of rows in a cursor? > I4GL v4.10 > TIA. > Ramiro > When you are done processing the cursor SQLCA.SQLERRD[3] will have that value. What we do is: CONSTRUCT q_strg .... LET strg = "SELECT COUNT(*) FROM ... WHERE ", q_strg clipped PREPARE... OPEN ... FETCH ... CLOSE ... LET strg = "SELECT columns ..... ", q_strg clipped The first query is then running in identical fashion to the second and returns just the count(*) it's fast enough too. cheers j. ________________________________________________________________________ Jack Parker - Hewlett Packard, DMD/IS Boise, Idaho, USA (x65388) jparker@boi.hp.com Currently on loan to CTSB/DTC ________________________________________________________________________ Outside of a dog a book is a man's best friend. Inside of a dog it's too dark to read. (Groucho Marx) ________________________________________________________________________ Any opinions expressed herein are my own and not those of my employers. ________________________________________________________________________