A final comment on the << ??? >> indication of an error. We would all love to have error messages that pinpoint errors, but I thought some background on the 'why' of this type of error message would be in order.
SQL is a computer language and, as such, is compiled into an 'executable' much the same way COBOL or C or VB .Net is compiled into something that is 'executable'. In particular, the 'executable' delivered by the SQL compiler in Relativity is called a 'query plan', and Relativity has tools to display the query plan in a graphical fashion.
So, the error message is coming out of a computer language compiler. Compilers have often scanned several symbols ahead of the actual symbol (or lack of symbol) causing the error, and may have imperfect knowledge of what went wrong, but are certain that 'something' went wrong. That is what happened here, and the << ??? >> indicates where the source scanner was when the error was discovered (it was expecting some reserved word, not a user word).
SQL compilers are somewhat special in that they are often invoked as part of a production environment. In previous times, SQL statements would be prepared (i.e. pre-compiled) and the execution/query plan saved away for later use. That still happens in high performance situations (especially mainframes), but in ad hoc reporting the PREPARE is often simply not done in favor of direct execution. This fact places a premium on the performance of the SQL compiler as measured in time and optimization of the query plan (which can dramatically affect runtime performance). This performance may come as a trade off on error message clarity and exactness, but is understandable because - unlike other compilers - the SQL compiler spends most of its life compiling and optimizing absolutely correct statements as quickly as possible.