Subject | Re: [firebird-support] conditions on results |
---|---|
Author | Martijn Tonies |
Post date | 2006-02-07T15:07:01Z |
Hi,
Initialize your variables used in the INTO clause with, for example,
NULL. If no values can be found, the value will stay unchanged
and you can check for this value in your code.
in procedures that you want to make select-able.
In Firebird 2, you can use the ROW_COUNT function.
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> 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
>This misses an INTO clause.
> SELECT code
> FROM table
> WHERE code = :myInput
Initialize your variables used in the INTO clause with, for example,
NULL. If no values can be found, the value will stay unchanged
and you can check for this value in your code.
> IF ( /* no result */) thenSUSPEND has no effect here and should only be used
> begin
> exception myException;
> suspend;
in procedures that you want to make select-able.
In Firebird 2, you can use the ROW_COUNT function.
> endMartijn Tonies
> ELSE
> ....
> ....
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com