Subject | Re: [Fwd: "Illegal" subquery in if-clause] |
---|---|
Author | Svein Erling Tysvær |
Post date | 2005-01-21T14:43:49Z |
--- In firebird-support@yahoogroups.com, Urs Liska wrote:
Try
IF EXISTS(SELECT * FROM sp_gedicht_ausgabenid(NEW.gedicht_id) sga
WHERE sga.ausgabe_id = NEW.ausgabe_id)
Note: I haven't tried it and don't know whether it works or not.
HTH,
Set
> Hello,Hi Urs!
>
> I have a problem with a trigger.
>
> I wanted to do a check with a subquery in an if-clause:
>
> IF (NEW.ausgabe_id IN
> (SELECT ausgabe_id
> FROM sp_gedicht_ausgabenid(NEW.gedicht_id)))
Try
IF EXISTS(SELECT * FROM sp_gedicht_ausgabenid(NEW.gedicht_id) sga
WHERE sga.ausgabe_id = NEW.ausgabe_id)
Note: I haven't tried it and don't know whether it works or not.
HTH,
Set