Re: Query question
Posted in 1995
Francis Small (fthes@sr.hp.com) wrote:
Interestingly enough, it turns out that:
SELECT COUNT(UNIQUE field) INTO row_count FROM table
is NOT equivalent to:
SELECT UNIQUE field FROM table INTO TEMP temp_table
SELECT COUNT(*) INTO row_count FROM temp_table
DROP TABLE temp_table
In the case where `field' contains only NULLs, the first method returns 0
and the second method returns 1.
--
| . . . . . . . . . 1 . . . . . . . . . 2 . . . . . . . . . 3 . . . . . . . .
Bums Francis Small - M/S 2LRS
Rockies Hewlett-Packard Company
Padres Microwave Instruments Div.
GIANTS 1212 Valley House Dr.
Rohnert Park CA, 94928
707 794 3305
fthes@sad.hp.com
************** Only 109 days left until Opening Day! (we hope) ***************