Just curious if there's anything in SQL comparable to a FOR EACH ROW trigger in Oracle.
I'm doing an import of a bunch of rows into a parent table using an INSERT/SELECT statement and I have triggers that fire pulling data from the same row in the source table into the child tables and creating the foreign key references. The problem lies in
the fact that the triggers only fire once seeing as how it reads the INSERT statement as one statement and not row by row.
Any thoughts?
Thanks.
Pete
There is no equivalent. You can search the newsgroups (.programming) for
many examples. In general, set-based solutions are faster and more
efficient for any sql programming.
"Pete" <Pete@.discussions.microsoft.com> wrote in message
news:3287C30A-AAF3-408C-83F9-9F72DC78ADAD@.microsoft.com...
> Just curious if there's anything in SQL comparable to a FOR EACH ROW
trigger in Oracle.
> I'm doing an import of a bunch of rows into a parent table using an
INSERT/SELECT statement and I have triggers that fire pulling data from the
same row in the source table into the child tables and creating the foreign
key references. The problem lies in the fact that the triggers only fire
once seeing as how it reads the INSERT statement as one statement and not
row by row.
> Any thoughts?
> Thanks.
> Pete
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment