Thanks marist89. I thought I had tried that but I'll certianly try it again.

I've got the query working overall now in Freetoad, but when I run it from command line in sqlplus (v8.1.7) I get errors:
Code:
SP2-0734: unknown command beginning "WHERE enum..." - rest of line ignored.
SP2-0734: unknown command beginning "AND   enum..." - rest of line ignored.
SP2-0734: unknown command beginning "AND   enum..." - rest of line ignored.
SP2-0734: unknown command beginning "AND		 a.c1..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning "AND		 a.c1..." - rest of line ignored.
SP2-0734: unknown command beginning "AND		 a.c1..." - rest of line ignored.
SP2-0734: unknown command beginning "AND		 a.c1..." - rest of line ignored.
SP2-0734: unknown command beginning "AND		 a.c1..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning "AND		 a.c1..." - rest of line ignored.
SP2-0734: unknown command beginning "AND		 a.c1..." - rest of line ignored.
Input truncated to 9 characters
I'm searching this site and the net for what might be wrong now.

Thank you for all your input!

Mark