Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

SQL SPLIT STRING

$
0
0

I wanted to know if it would be possible to do something like this in t-sql.

I want to create a stored procedure which takes a list of invoice numbers and uses it as a parameter for my stored procedure

PARAMETER = @INVOICES NVARCHAR

UPDATE INVOICES SET STATUS = 'INVOICE' WHERE INVOICE IN(@INVOICES)

and in my c# code I will fill the parameter with a list of invoices separated by a comma I need those to be able to go in the IN of the update command but the problem is that the invoice column is an int column so it doesn't recognize all the invoices with the comma in middle.


Debra has a question



Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>