Subject Re: [ib-support] SELECT in stored proc returns wrong value
Author Martijn Tonies
> It'll be great if there was a more clean and elegant way
> to check in a stored procedure after a select if it has
> returned values or not (especially because checking
> for NULL is not really equal with checking for no result
> anyway). Of course, a SELECT COUNT(x) before
> the actual select would work, but I think that's not
> elegant nor efficient (but precise at least).

And make sure that if you do:

SELECT COUNT(column) FROM table WHERE somestuff

that COUNT will only count the rows where 'column' is NOT NULL



--
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com

Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."