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?
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?
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
ASKER
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
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
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thx
You cannot print from a trigger (whatever you mean by "Print")
/Richard