We have a table of User ID's with a varchar column that turns out to be a list of foreign keys. Why is it a list and not a reference, because it has to be :/
USERID CLASSES_ATTENDED
100099 01052013,02042013,04302013,06042013
A table does exist that matches these classes to their names, but we have no way of list the class name to the user id.
CLASS NAME
01052013 MATH
02042013 SCIENCE
04302013 COMPUTERS
06042013 COOKING
The only solution available to me is to use an after insert trigger on the varchar CLASSES_ATTENDED column that will read each "key" one-by-one and then insert the USERID/CLASS records(s) in another table.
How do I de-sequence the list then execute one INSERT statement for each item within a trigger declaration?
I have SQLServer 2005, with a Management Studio non-SSIS installation.
Thanks in advance!