Okay, so I've got THREE MSSQL Tables.
First table is: Eponyms : ID, NAME, DESCRIPTION, CATEGORIES
Second table: Categories : ID, CATEGORY
Third is the intersecting table: EponymCategory : ID, EponymID<FK>, CategoryID<FK>
The "Eponyms" table has the list of Eponyms, and the CATEGORIES column is inserted with data like "PSYCH CHEM BIO"
The "Categories" table has the list of categories, "PSYCH", "CHEM", "BIO" listed separately etc..
Now, I need a trigger on the Eponyms table, that would read the "CATEGORIES" column being inserted, and would compare the entries in the "Categories" table... I'm having trouble figuring out how to do this... The Data being inserted into this column is formed like "PSYCH CHEM BIO" -- separated by a space.
I need something like, INSERT INTO EponymCategory (?, ?) WHERE Eponyms.CATEGORIES LIKE %Categories.CATEGORY%
How would something like this be done?