Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
programer
Posting Yak Master
221 Posts |
Posted - 2011-04-27 : 09:34:56
|
ALTER TRIGGER InsertTriggerON tbl_BettingSlipInfoAFTER INSERTASBEGININSERT into tbl_UserTransaction(UserId, TransactionAmount) VALUES ('s', ('10'))ENDIn the table tbl_UserTransaction I would like saved data from tbl_BettingSlipInfo.tbl_BettingSlipInfo:UserIdtbl_UserTransaction:UserIdWhen I saved UserId, are data stored in tbl_UserTransactionPlease help |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-04-27 : 09:41:31
|
ALTER TRIGGER InsertTriggerON tbl_BettingSlipInfoAFTER INSERTASBEGININSERT into tbl_UserTransaction(UserId, TransactionAmount)select UserID, Amountfrom insertedENDseehttp://www.nigelrivett.net/SQLTriggers/Triggers_1_A_beginners_guide.html==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|