我在以这种方式插入数据时遇到了问题。
如何使用存储过程以这种方式插入数据。
INSERT INTO [dbo].tbl_Transaction
(
[FK_GameID] ,
[SpotID] ,
TransactionReason ,
TransactionType ,
TransactionAmount
--PrevAmountBalance,
-- CurrentBalance
)
SELECT tblTransaction.Row.value('@FK_GameID','BIGINT'),
tblTransaction.Row.value('@SpotID','SMALLINT'),
tblTransaction.Row.value('@TransactionReason','SMALLINT'),
tblTransaction.Row.value('@TransactionType','Varchar(50)'),
tblTransaction.Row.value('@TransactionAmount','MONEY')
--@OpeningBalance,
-- (@OpeningBalance-tblTransaction.Row.value('@TransactionAmount','MONEY'))
FROM @TransactionTable.nodes('/row') AS tblTransaction(Row)