My company's database has over a hundred files which contain the column "CoreID". I want to create a SP that will delete all records for a certain value of CoreID.
I'm guessing I should use a cursor, but I can't find a good example of exactly what I'm trying to do. First, I have an SQL statement that will give me the names of all files which have the CoreID column. For each of those files, I want to DELETE FROM <filename> WHERE CoreID = <some value>
What should my SQL look like?