Subject | Rows affected... |
---|---|
Author | Rasmus Olesen |
Post date | 2004-07-09T00:36:19Z |
Hi
In MSSQL one can use the @@RowCount system value, that holds :
--MSSQL help--
Returns the number of rows affected by the last statement
--MSSQL help--
What is the closest equiv. in FB 1.5 ?
More specifically : I want to optimize the translation of this in
general :
(MSSQL)
<select query>
if @@ROWCOUNT = 0 then <do_something_rescue>
..without doing the trivial ineff. rewrite :
(FB)
(select count(*) <same select's FROM+WHERE part, FB flavoured>)
into :tmp;
if(:tmp = 0) then <do_something_rescue>
else
<select query, FB flavoured>;
tia.
/Rasmus
In MSSQL one can use the @@RowCount system value, that holds :
--MSSQL help--
Returns the number of rows affected by the last statement
--MSSQL help--
What is the closest equiv. in FB 1.5 ?
More specifically : I want to optimize the translation of this in
general :
(MSSQL)
<select query>
if @@ROWCOUNT = 0 then <do_something_rescue>
..without doing the trivial ineff. rewrite :
(FB)
(select count(*) <same select's FROM+WHERE part, FB flavoured>)
into :tmp;
if(:tmp = 0) then <do_something_rescue>
else
<select query, FB flavoured>;
tia.
/Rasmus