I have to write code to produce data along the lines of SIZE, COLOUR and PATTERN. I'm coming unstuck because I have to apply specific constraints on PATTERN given a specific SIZE and COLOUR. For example, SIZE=10; COLOUR=R; PATTERNID must not be in (001,009): SIZE=10; COLOUR=G; PATTERNID must not be in (001,002,008) and so on.
I'm not new to programming, but am to SQL and I can't seem to get the syntax right. Any help would be much appreciated! :-)