I have this query:
s="update myTable set date='09/09/12' where crc32 in("+list+")";
But because of my list is with thousands of values I think that there is a better way to do it. I don’t know which way, or how.
Update: The column crc32 is int. The list is string like:
list = "2345,-6467,7865,7654,...."
I exeute the query by c#. the list contains values that I cann’t get them by sql query, just through my code.
Thanks
Check Table valued parameters. http://msdn.microsoft.com/en-us/library/bb510489.aspx Put it in a stored procedure, like:
And call it from C# with a datatable parameter containing your crc32