AFTER INSERT trigger
From: Just D. (no_at_spam.please)
Date: 08/19/04
- Next message: SQL Apprentice: "how to generate activities on sql db"
- Previous message: Robert Taylor: "Re: Null and not equal in Join Condition"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 19 Aug 2004 13:34:42 -0700
All,
How this trigger should be fired if I insert for example 400-500 records? I
suspect that the trigger will be fired only once when all records are
inserted, is it true?
I'd like to work with every inserted record separately, what should I do for
that? To write this code in the trigger, like:
WHILE (SELECT COUNT (ID) FROM SomeTable WHERE ID IS NULL )
...Some code...
Is it correct?
And how can I parse the variables from the inserted record? I know about
INSERTED but if I add a semicolon ; then this doesn't work anymore.
Just in two words - the schema is simple - I INSERT many records from some
remote database and I need a trigger to propagate these values to some
database tables from the bridge table. I need to parse all these values one
by one and INSERT these records in another table on the same MSSQL server.
What I need to get - I need to get all fields one by one inserted by remote
database, create an INSERT string to insert this data into another one
database table and finally to get an assigned record ID from this database
table and UPDATE this value on the bridge table only for the record I was
working with.
Just D.
- Next message: SQL Apprentice: "how to generate activities on sql db"
- Previous message: Robert Taylor: "Re: Null and not equal in Join Condition"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|