0
我正在使用SQl-server 2012,此代碼位於存儲過程中。存儲過程
這些是我的SQL查詢。當「更新」查詢未執行時,我想要執行「插入」查詢。 如果更新查詢已執行,則不應執行插入查詢。
Update tblStock Set Balance= Balance + @ReduceRawQty
Where [email protected]
AND [email protected]
and [email protected]
Insert Into tblStock(LocCode, ItemCode, CostPrice, Balance,Transfer,PCode)
Values(@LocCode,@rawitemcode,@RawCostPrice,@RawQty,0,@PCode)
是否有任何方法來做到這一點,請大家幫我
感謝您的幫助......它的工作 –