I have an events table with a class field that I need to search. The class field contains a comma-delimited list of all the grade levels involved in event. For instance, if the event included just high schoolers it would be "12,11,10,9", or if it was even-numbered grades it would be "12,10,8,6,4,2".
The problem is trying to search this field for certain grades. Grades 3-12 are no problem (using INSTR()), but trying to search for all events that have, say, first graders is proving to be problematic. Searching for a '1' in the field will also return all that have 10th, 11th and 12th grades. And trying to search for rows that have "1" but not "10" will exclude rows which have both, and I need to include these.
Any ideas?
The problem is trying to search this field for certain grades. Grades 3-12 are no problem (using INSTR()), but trying to search for all events that have, say, first graders is proving to be problematic. Searching for a '1' in the field will also return all that have 10th, 11th and 12th grades. And trying to search for rows that have "1" but not "10" will exclude rows which have both, and I need to include these.
Any ideas?