I forgot the code snippet.
<cfquery name="qTransCheck" datasource=#DSN# dbtype="odbc">
select distinct(count prodcode)
from product
where product.manufid = '#scan.manufid#'
<cfif variables.stError.v010.occurred>
AND product.famcode2 matches '#left(scan.famcode, 2)#.'
</cfif>
<cfif variables.stError.v012.occurred>
AND product.famcode2 matches '#left(scan.famcode,1)#..'
</cfif>
<cfif variables.stError.v008.occurred><!--- Nothing ---></cfif>
<cfif not variables.stError.v010.occurred and
not variables.stError.v012.occurred and
not variables.stError.v008.occurred>
AND product.famcode2 = '#scan.famcode#'
</cfif>
and product.famcode > '000'
and product.prodcode not in
(select prodcode from product where manufid='#scan.manufid#'
<cfif variables.stError.v010.occurred>
and product.famcode matches '#left(scan.famcode, 2)#.')
</cfif>
<cfif variables.stError.v012.occurred>
and product.famcode matches '#left(scan.famcode,1)#..')
</cfif>
<cfif variables.stError.v008.occurred>
) <!--- Nothing --->
</cfif>
<cfif not variables.stError.v010.occurred and
not variables.stError.v012.occurred and
not variables.stError.v008.occurred>
AND product.famcode = '#scan.famcode#' )
</cfif>
</cfquery>
On Mon, Mar 16, 2009 at 3:45 PM, Steve Lichtenberg
<[email protected]> wrote:
> Can anyone point me to the error in this code and the generated query?
> I am kind of stuck right now as it all looks ok to me.
>
> Thanks
> --S
> ^
>
>
> [Macromedia][SequeLink JDBC Driver][ODBC Socket][DataDirect][ODBC
> Progress OpenEdge Wire Protocol driver][OPENEDGE]Syntax error in SQL
> statement at or about "prodcode) from product where product.man"
> (10713)
>
> The error occurred in
> C:\htdocs\couponchek.com\barcode\pdf_bc_results.cfm: line 191
> Called from C:\htdocs\couponchek.com\barcode\pdf_bc_results.cfm: line 123
> Called from C:\htdocs\couponchek.com\barcode\pdf_bc_results.cfm: line 1
> Called from C:\htdocs\couponchek.com\barcode\pdf_bc_results.cfm: line 1
> Called from C:\htdocs\couponchek.com\barcode\pdf_bc_results.cfm: line 191
> Called from C:\htdocs\couponchek.com\barcode\pdf_bc_results.cfm: line 123
> Called from C:\htdocs\couponchek.com\barcode\pdf_bc_results.cfm: line 1
> Called from C:\htdocs\couponchek.com\barcode\pdf_bc_results.cfm: line 1
>
> 189 : not variables.stError.v008.occurred>
> 190 : AND product.famcode = '#scan.famcode#' )
> 191 : </cfif>
> 192 : </cfquery>
> 193 : </cfif>
>
> SQL select distinct(count prodcode) from product where
> product.manufid = '030030' AND product.famcode2 = '111' and
> product.famcode > '000' and product.prodcode not in (select prodcode
> from product where manufid='030030' AND product.famcode = '111' )
>
> --
>
> Jean Anouilh - "What you get free costs too much."
>
--
Jean Anouilh - "What you get free costs too much."
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320553
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4