Is there a way other than SAMPLE to get rows from a table?
I am writing some error checking to verify that a table is populated using the ACTIVITYCOUNT feature. The tables I am running it against are rather large tables and if I use a statment like the following, it is taking a long time.
SELECT *
FROM large_table
SAMPLE 2;
.IF ACTIVITYCOUNT > 1 THEN .GOTO CONTPROC
Doing a count of the table always returns 1 row, so this doesn't work.
Does anyone have any ideas?
Thanks
Craig
I am writing some error checking to verify that a table is populated using the ACTIVITYCOUNT feature. The tables I am running it against are rather large tables and if I use a statment like the following, it is taking a long time.
SELECT *
FROM large_table
SAMPLE 2;
.IF ACTIVITYCOUNT > 1 THEN .GOTO CONTPROC
Doing a count of the table always returns 1 row, so this doesn't work.
Does anyone have any ideas?
Thanks
Craig