>Is there a way to run an SQL SELECT and get ALL the rows of data and still get a COUNT(*)? I have tried this, but it looks like like I'm just getting the last row of data along with the count. TIA, Chuck.
No easy way, afaik. You could join in the count information or use a union to add two tables together.
I would probably do this:
select * from mytable into cursor mycursor
select cnt(*), key from mytable group by mykey into cursor mycounts
select * from mycursor, mycounts where mycursor.key = mycounts.key
You might have to play around with dbf() or selecting into tables instead of cursors, but this should put you on the right track!
--Todd Sherman
-Wake Up! Smell the Coffee!