Hey everyone,
I have the following SQL statement:
SELECT Out.ID
FROM Quote Inc
INNER JOIN Quote Out ON Inc.Code = Out.Code
WHERE Inc.ID IN (@TourIDString) AND Inc.ID <> Out.ID
@TourIDString contains values like so:
‘89918, 89641, 89644, 89668, 89649’
So when putting this into context, the SQL Statement in return would be this:
SELECT Out.ID
FROM Quote Inc
INNER JOIN Quote Out ON Inc.Code = Out.Code
WHERE Inc.ID IN ('89918, 89641, 89644, 89668, 89649') AND Inc.ID <> Out.ID
My question is, that is there any way or removing the apostrophes so that i am returned with this:
SELECT Out.ID
FROM Quote Inc
INNER JOIN Quote Out ON Inc.Code = Out.Code
WHERE Inc.ID IN (89918, 89641, 89644, 89668, 89649) AND Inc.ID <> Out.ID
Hope someone can help me out?
Kind regards,