Is this the error? 2604 Bad argument involving ... for SQRT function.
First try adding a condition to see if actually a >= b: WHERE a >= b
Do you run that query in SQL Assistant pre-TD13? Then it might be because of the ODBC SQRT function, too. Uncheck Tools - options - query - 'Allow use of ODBC SQL extensions in queries' I can't check this, because i don't have access to a SQLA 12 anymore.