Hello - I would like to cast multiple variables which are coming from .net solution to integer. Something like this: I am using IN keyword for selecting more then one keyword, because I don't know how many variables are selected by the customer and I am putting them in nvarchar variable.
Example:
StatusID selected: 30,40,50
'30,40,50' its passed as sql nvarchar parameter to the sql server
and I want to convert them to integer and have something like: IN (cast(30,40,50 as int)) This way I am getting an error.
Can someone help me how I can set the proper sql syntax. Thanks, Laziale