I am currently trying to split a string that I receive in a stored procedure, the current string format is: @string varchar(100) = (VALUE THAT COME AS A PARAMETER IN THE SP)'223,879,354,145,698,129'
.
I need to split the string as I have to compare the numbers inside of it in a in statement such as below:
where number in (splited numbers)
and example = 'op'
and source not in ('qw', 'mn')
Do you know how I can split this string variable and save the result in a separate variable?.
I will also need the string value as it comes in the SP parameter for other purposes inside the SP