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 |
|
jesus4u
Posting Yak Master
204 Posts |
Posted - 2004-06-18 : 11:07:37
|
I should have seen this but I still want to use this proc this way.I can't seem to update the table using the IN clause because the InvoiceID is an integer and the @OrderIDs is a comma separated list ('28,29') of InvoiceIDs that I want to update.CREATE PROCEDURE CancelOrders @OrderIDs varchar(5000)AS UPDATE Orders SET Status = 'cancelled' WHERE InvoiceID IN (@OrderIDs)GO Please help.Thanks |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2004-06-18 : 11:32:12
|
| And I like to point out:where charindex(',' + InvoiceId + ',', ',' + @OrderIds + ',')>0though it may be slower if it is a huge table.Corey |
 |
|
|
|
|
|