Jim
MS SQL only fires a trigger once per operation (not once per row)
The inserted and deleted tables are the changed rows, If you
wish to do an operation per row inserted then you can prob declare a
cursor on the inserted row set and scroll thu that
HTH
Neven
----- Original Message -----
From: "Jim Zheng" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Friday, August 03, 2001 9:59 PM
Subject: [DUG]: MS SQL trigger
> Hi all,
>
> I have a INSERT trigger for a table, when I am inserting multiple records
> into the table by "insert the_table select * from another_table", I found
> the insert trigger only been trigged once, the inserted buffer only hold
> last inserted record's data. Why? How can I let the trigger run as many
> times as the number of records, so each time I can do something on each
> record individually?
>
> Regards,
>
> Jim
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/