Hi
We run under SQL7
I insert Data into table A
An insert trigger exist for this table
This trigger insert into an historic table
I got the ID of the insert of Historic table
what can I do ?
thanks
We run under SQL7
I insert Data into table A
An insert trigger exist for this table
This trigger insert into an historic table
I got the ID of the insert of Historic table
what can I do ?
thanks
the trigger finishes, ie:
create trigger... blahblah
begin
insert into historic ( data1, data2 ) select data1, data2 from inserted
end
i have no idea if that'll work
only other option i can think of would be to make that a business rule and
utilitize Distributed Tx's
--
Eric Newton
.net, ASPX Developer
> We run under SQL7
> I insert Data into table A
> An insert trigger exist for this table
> This trigger insert into an historic table
> I got the ID of the insert of Historic table
> what can I do ?
> thanks
> We run under SQL7
> I insert Data into table A
> An insert trigger exist for this table
> This trigger insert into an historic table
> I got the ID of the insert of Historic table
> what can I do ?
> thanks
- Anith
> the trigger finishes, ie:
> create trigger... blahblah
> begin
> insert into historic ( data1, data2 ) select data1, data2 from
inserted
> end
> i have no idea if that'll work
> only other option i can think of would be to make that a business rule and
> utilitize Distributed Tx's
> --
> Eric Newton
> .net, ASPX Developer
> > Hi
> > We run under SQL7
> > I insert Data into table A
> > An insert trigger exist for this table
> > This trigger insert into an historic table
> > I got the ID of the insert of Historic table
> > what can I do ?
> > thanks
User SCOPE_IDENTITY. It gives you the last ID you generated via INSERT
Doo
> > Hi
> > We run under SQL7
> > I insert Data into table A
> > An insert trigger exist for this table
> > This trigger insert into an historic table
> > I got the ID of the insert of Historic table
> > what can I do ?
> > thanks
Mike John
> > Hi
> > We run under SQL7
> > I insert Data into table A
> > An insert trigger exist for this table
> > This trigger insert into an historic table
> > I got the ID of the insert of Historic table
> > what can I do ?
> > thanks
In the SP *before* the INSERT do:
In the trigger *before* any INSERT do:
In the SP *after* the INSERT (and any other statements) do either or both of
these:
> Mike John
> > IDENT_CURRENT (I'm looking at SQL2000 BOL)
> > > Hi
> > > We run under SQL7
> > > I insert Data into table A
> > > An insert trigger exist for this table
> > > This trigger insert into an historic table
> > > I got the ID of the insert of Historic table
> > > what can I do ?
> > > thanks
1. Problem with @@identity and trigger
Hi
We run under SQL7
I insert Data into table A
An insert trigger exist for this table
This trigger insert into an historic table
I got the ID of the insert of Historic table
what can I do ?
thanks
Jacob
2. pgsql/src/test/regress (regress.sh)
3. Trigger problem w/ @@Identity...Please Help!!
4. Programmer/analyst wanted (Progress V7.3)
5. Trigger and @@IDENTITY problems
6. Stop DataObject error appearing before I get to change it in my app
7. Identity and trigger - wonder problem
9. Trigger (insert) and @@identity problem...
10. IDENTITY column problems with triggers
11. Passing identity values outside triggers
12. help! @@IDENTITY and nested triggers