Author |
Topic |
QuietRiot
Yak Posting Veteran
67 Posts |
Posted - 2009-03-11 : 20:07:22
|
Easy question. If I wanted to run the 5 commands together what would be the best way of doing it? Can I put GO in between?-- 7 rowsUPDATE FundTransactionLinesSET SuppressVoidsFlag = 0WHERE TransactionID in (98482,98486,98487,98615,98638,98634,98681)AND FundTransactionLineno = 1-- 4 rowsUPDATE FundTransactionLinesSET SuppressVoidsFlag = 0WHERE TransactionID in (98490)AND FundTransactionLineno in (13, 15, 21, 23)-- 18 rowsUPDATE FundTransactionLinesSET SuppressVoidsFlag = 0WHERE TransactionID in (98482,98782,98705,98707,98732,98741,98766,98779,98787,98812,98828,98831,98834,98845,98869,98904,98919,98926)AND FundTransactionLineno = 3-- 3 rowsUPDATE FundTransactionLinesSET SuppressVoidsFlag = 0WHERE TransactionID in (98482,98492,98784)AND FundTransactionLineno = 5-- 2 rowsUPDATE FundTransactionLinesSET SuppressVoidsFlag = 0WHERE TransactionID in (98482)AND FundTransactionLineno in (7,9) |
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-03-11 : 21:30:07
|
Yeah u can use GO. |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-03-11 : 22:33:31
|
Why can't you incorporate them into 1 transaction and run? |
|
|
QuietRiot
Yak Posting Veteran
67 Posts |
Posted - 2009-03-11 : 23:32:31
|
quote: Originally posted by sodeep Why can't you incorporate them into 1 transaction and run?
I made it 5 different sets because for example on the 2nd one there is a line 13 and I wouldn't want any of the TransactionID's in the first set to update line 13. |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-03-17 : 07:57:54
|
But I thought you wanted to run them together. So, The result will be the same. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2009-03-17 : 08:16:31
|
You can do this in one UPDATE statement:UPDATE FundTransactionLinesSET SuppressVoidsFlag = 0WHERE (TransactionID in (98482,98486,98487,98615,98638,98634,98681) AND FundTransactionLineno = 1)OR (TransactionID in (98490) AND FundTransactionLineno in (13, 15, 21, 23))OR (TransactionID in (98482,98782,98705,98707,98732,98741,98766,98779,98787,98812,98828,98831,98834,98845,98869,98904,98919,98926) AND FundTransactionLineno = 3)OR (TransactionID in (98482,98492,98784) AND FundTransactionLineno = 5)OR (TransactionID in (98482) AND FundTransactionLineno in (7,9)) |
|
|
|
|
|