0

I have a Subjects table with a field Prerequisites, which contains data similar to the Subject IDs in the same table. So for example a subject4 may have the prerequisites subject2 and subject3. The contents of the Prerequisite field are delimited by ORs and ANDs, meaning if there are more than one prerequisites then the other may be optional or required. Anyway, I've a problem with selecting subjects with more than one prerequisite. How do I do this? If there's just one I could just do SELECT subjectID FROM Subjects WHERE Prerequisites = subjectID or something but I dont know how to include the delimiters.

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by flushfire
0

The subjects table has the fields:
Subject Code, Description, Prerequisites
contents ex: CPRG 1, Fundamentals of Programming 1, None
ex with prerequisites: PPL, Principles of Programming Languange, CPRG 1 and CPRG 2
another: OOP, Object-Oriented Programming, CPRG 1 or CPRG 2

I've solved the problem by splitting the prerequisites field into three, one for the first, another for AND prerequisites and another for OR. It's not the best solution, but I had to find a way around the problem. :(

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.