I have a comma separated list of items that I retrieve from a table, the result is so
declare @IDs = varchar(max)
set @IDs = '11,23,33,44,55' -- this varies
From this onward what I want to do is to iterate through each one and compare to my table and see if that ID exists, If it exists update the row but if it does not add a row to my table.
Any help is appreciated.