Count(*) returns zero incorrectly ?!?

Post Reply
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

Count(*) returns zero incorrectly ?!?

Post by barry.marcus »

When I issue the command SELECT * FROM MYTABLE I get a endlessly scrolling list of rows (as I should, since there are ~ 10 million rows in the table.) But when I issue the command SELECT COUNT(*) FROM MYTABLE I get zero!

Any ideas as to what may be wrong? BTW, we just copied over the *.TBL from one machine to this one. How to we get the system tables in synch?
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Count(*) returns zero incorrectly ?!?

Post by John »

It sounds like you probably have indexes that weren't copied, and it is counting from the index. You should drop and recreate all the indexes, or make sure they were created identically and copied as well.
John Turnbull
Thunderstone Software
Post Reply