Subject | RE: [firebird-support] Newbie on SPs: HELP ON STORED PROCEDURE |
---|---|
Author | Helen Borrie |
Post date | 2005-02-01T23:58:17Z |
At 06:31 PM 1/02/2005 -0200, you wrote:
In many cases you don't need a SP for this this check Your dynamic SQL
simply needs to include the existence check in its search clause, e.g.
insert into atable a1 (blah1, blah2, blah3)
values (?, ?, ?)
where <other search conditions>
and not exists(select 1 from atable a2 where a2.blah1 = ?)
Please would you set your email client to plain text when posting to the
lists and also trim your replies.- thanks.
^heLen
>hi Clay,Show us the actual source of the SP.
>
>Thanks for the tip!
>
>I am using IB Expert personal edition and when I try to compile de SP, an
>error is reported
>(parser error)
>The cursor is placed after the number 1 in the first select statement..
In many cases you don't need a SP for this this check Your dynamic SQL
simply needs to include the existence check in its search clause, e.g.
insert into atable a1 (blah1, blah2, blah3)
values (?, ?, ?)
where <other search conditions>
and not exists(select 1 from atable a2 where a2.blah1 = ?)
Please would you set your email client to plain text when posting to the
lists and also trim your replies.- thanks.
^heLen