I have two close to identical sql statements from two different templates. Only of one of them works, but I can't fiqure out why one is getting an "ORA-00933: SQL command not properly ended " error here are two sql statements
working:
not working:
Anyone have any ideas as why the second one might not work? Maybe I have been trying to fix it for so long, I am missing the obvious.
working:
Code:
<cfparam name="form.DISTRIBUTORID" default="All">
<cfquery name="qCurriculumKits">
select * from CurriculumKits
<cfif not(form.DISTRIBUTORID eq "All")>
<cfif IsDefined("url.DISTRIBUTORID")>
where DISTRIBUTORID='#url.DISTRIBUTORID#'
</cfif>
<cfif IsDefined("form.DISTRIBUTORID")>
where DISTRIBUTORID='#form.DISTRIBUTORID#'
</cfif>
</cfif>
</cfquery>
not working:
Code:
<cfparam name="form.ITVLocation" default="All">
<cfquery name="qITVSessions">
select * from ITVSessions
<cfif not(form.ITVLocation eq "All")>
<cfif IsDefined("form.ITVLocation")>
where ITVLOCATION='#form.ITVLocation#'
</cfif>
<cfif IsDefined("url.ITVLocation")>
where ITVLOCATION='#url.ITVLocation#'
</cfif>
</cfif>
</cfquery>
Anyone have any ideas as why the second one might not work? Maybe I have been trying to fix it for so long, I am missing the obvious.