Link to home
Create AccountLog in
Avatar of sainavya1215
sainavya1215

asked on

Write Trigger to Print Inserted Records

Hi,
I have a stored procedure which INSERTS BULK RECORDS into a Table using OpenXML approach

Now I would like to write a trigger on the same table to Print out all the inserted records
Looping thru the inserted Table in Trigger..

Considering Table -- Customer    and bulk rows inserted in columns Customer_ID,Customer_Name

can example be shown?
Avatar of RichardCorrie
RichardCorrie

Print Out ???

You cannot print from a trigger (whatever you mean by "Print")

/Richard
Avatar of sainavya1215

ASKER

Well if u insert Bulk records in sql query analyzer and we have a trigger being fired on same table which has print statements then we can see in query analyzer
ok let me put it in this way :

all the Inserted records(ie bulk Insert) into customer Table (with columns  customer_ID,CustomerName)

...Now the trigger is fired on the customer Table and all the inserted records should be inserted into a different table known as History with the same columns Customer_id,customerName........

Lets consider this
ASKER CERTIFIED SOLUTION
Avatar of strangelynormal1
strangelynormal1
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Thx