FrancineTaylor
asked on
How to perform an action on each of a list of tables
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?
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I guess you can do it with a temp table or a cursor...