Posted in 1998
On Thu, 23 Apr 1998 22:00:00 -0600, hashish1@mailcity.com wrote: >Is there a way that i can use 'select count(*) field1,field2,field3 from >table' without using the 'group by' or 'having' clause. I want to fetch >records and count them using the 'count(*)' function in one sql statement. Is >that possible? Thank you:) What do you realy want? A running count (1 on the first row retrieved, 2 on the second and so on)? No such thing exist. Do you want a count only when all rows are retrieved? Look up the dbinfo function in the manual. May be it's there (or may be that was only in 7.3). Is this in a program? In that case it's a non problem. Simply count as you fetch. If it's 4GL or C you can also find the info in the sqlca record I think after all rows are fetched. Nils Myklebust NM Data AS Norway E-mail: Nils.Myklebust@nmdata.com FAQ at: http://www.iiug.org/techinfo/faq/faq_top.html (Now with ODBC info under "Third party products".)
We use strictly necessary cookies to make this site work. With your consent we’d also use optional cookies for analytics and marketing. You can accept all, reject all, or choose. Read our Cookie Policy.