Question
Does CFSQL Not Do Left Joins?
Hello. The following syntax works fine inside a
<CFQUERY> statement getting data from an ODBC database (where
JobList and Reported are tables in the datasource named in the
CFQUERY statement):
select * from JobList j left join Reported r on j.job_no = r.jobno
However, it does not work when embedded inside a <CFQUERY> statement trying to join two existing queries (i.e. dbtype = 'QUERY', where JobList and Reported are the names of the existing queries.
Instead I receive the error message:
Query Of Queries syntax error. Encountered "j.
If I remove the j and r aliases and go with select * from JobList left join Reported on JobList.job_no = Reported.jobno, I receive the error message:
Query Of Queries syntax error. Encountered "left
It does not help matters to add the word 'outer' after the word 'left'.
Should I be using a different syntax, or does CFSQL simply not do outer joins? The documentation says it does joins, but provided no examples.
If CFSQL simply cannot to outer joins, am I stuck? The two tables to be joined ultimately reside in completely different DB's: FoxPro and SQL Server.
Thanks for your help.

select * from JobList j left join Reported r on j.job_no = r.jobno
However, it does not work when embedded inside a <CFQUERY> statement trying to join two existing queries (i.e. dbtype = 'QUERY', where JobList and Reported are the names of the existing queries.
Instead I receive the error message:
Query Of Queries syntax error. Encountered "j.
If I remove the j and r aliases and go with select * from JobList left join Reported on JobList.job_no = Reported.jobno, I receive the error message:
Query Of Queries syntax error. Encountered "left
It does not help matters to add the word 'outer' after the word 'left'.
Should I be using a different syntax, or does CFSQL simply not do outer joins? The documentation says it does joins, but provided no examples.
If CFSQL simply cannot to outer joins, am I stuck? The two tables to be joined ultimately reside in completely different DB's: FoxPro and SQL Server.
Thanks for your help.