I am iterating a cursor, adding the index to a comma-delimited string, to make sure that the index doesn't get inserted in the new table twice (for a complicated reason, it can happen -- I didn't write the original db, I'm trying to fix it).
What's the function to check the string for the existence of the index? Is there an easier datatype than a comma-delimented list to search under? Realize that, unfortunately, due to processing constraints, I have to iterate.
e.g.,
if [@index not in @already_processed]
begin
insert @index
@already_processed = @already_processed + ',' + @index
end
fetch next into @index
What goes in the brackets???? __________________________________
You don't see with your eyes, you perceive with your mind.
What's the function to check the string for the existence of the index? Is there an easier datatype than a comma-delimented list to search under? Realize that, unfortunately, due to processing constraints, I have to iterate.
e.g.,
if [@index not in @already_processed]
begin
insert @index
@already_processed = @already_processed + ',' + @index
end
fetch next into @index
What goes in the brackets???? __________________________________
You don't see with your eyes, you perceive with your mind.