Subject | Re: [ib-support] Generator created PK in trigger: how to get that value? |
---|---|
Author | Artur Anjos |
Post date | 2002-08-14T00:30:56Z |
Hi Jaume,
You must get the value form the generator on the SP, not in the trigger BI.
Change your trigger that it just fires the generator creation if it is not
defined already.
Artur
You must get the value form the generator on the SP, not in the trigger BI.
Change your trigger that it just fires the generator creation if it is not
defined already.
Artur
----- Original Message -----
From: "Jaume Andreu Sabater Malondra" <jsabater@...>
To: <ib-support@yahoogroups.com>
Sent: Tuesday, August 13, 2002 10:25 AM
Subject: [ib-support] Generator created PK in trigger: how to get that
value?
> Hi everyone.
>
> I have got these tables: NEWS - NEWS_LANGUAGE - LANGUAGES, N-M
cardinality.
>
> I want to insert a row in table NEWS, then multiple rows in table
> NEWS_LANGUAGE using the primary key just created on NEWS as foreign key on
> NEWS_LANGUAGE.
>
> I have got a stored procedure, POST_NEWS, which first inserts in table
> NEWS. A trigger on event "before insert" raises and, using a generator,
> creates an integer value which is used as primary key.
>
> Now I would like to know how to get that "just created" value without
> having to launch a SELECT query after that INSERT.
>
> Finally, using that integer value, I have to launch multiple INSERT
> statements on table NEWS_LANGUAGE, which shouldn't give me any trouble if
a
> owe the primary key integer value.
>
> Thanks in advance.
>
> P.S.: I am sending again this message because I didn't receive it when
sent
> for first time, just after I subscribed. I apologize if this is the second
> time you read it :-)
>
> --
> Jaume Andreu Sabater Malondra
> jsabater@...
> Registered linux user #209072
>
> "Ubi sapientas ibi libertas"
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>