I'm going to take a quick punt (because it's 11pm).
Cursor syntax is simple. What is more difficult, and perhaps what you need to look into - is some of the tricks that can be accomplished with SELECT.
There are usually many many ways to accomplish the same thing... Based on a very quick reading of the question I think you might find the keyword MINUS useful. (You can use it in SELECT). Ditto, NOT IN and EXISTS - but I've always had a particular soft spot for MINUS.
Incidentally, was that the original question wording? They're not keen on punctuation by the look of things.
|