Subject RE: [firebird-support] conditions on results
Author Si Carter
> -----Original Message-----
> What condition can I use for this (look example) in a store
> procedure? Note than in this table there aren't a not null rows
>
>
> SELECT code
> FROM table
> WHERE code = :myInput
>
> IF ( /* no result */) then
> begin
> exception myException;
> suspend;
> end

myInput should be initialized to NULL to start with, if no record is found
then myInput will remain NULL, so you should be able to use

IF (myInput IS NULL) THEN
throw your exception here

Rgds

Si Carter
http://www.fbtalk.net/ - Web Based Firebird Forum
http://sourceforge.net/projects/fbutils - FBUtils
http://www.tectsoft.net/ - Homepage