Re: SQL Syntax error

2009-03-16 Thread Steve Lichtenberg
worked for me. Plus, that is what Adobe shows in their docs. 2009/3/16 Jason Fisher : > > Interesting ... COUNT(DISTINCT prodcode) will work, huh? That may come in > handy some day. Thanks! > > > > ~| Adobe® ColdFusion® 8 so

Re: SQL Syntax error

2009-03-16 Thread Donnie Carvajal
COUNT(DISTINCT [fieldName] is very important to remember when using JOINS. For example, if you have the query... SELECT COUNT(A.code) AS total FROM TableA A INNER JOIN TableB ON A.code = B.code And you wanted to know how many records in TableA have records in TableB. If this query returns 10

Re: SQL Syntax error

2009-03-16 Thread Jason Fisher
Interesting ... COUNT(DISTINCT prodcode) will work, huh? That may come in handy some day. Thanks! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doublecli

Re: SQL Syntax error

2009-03-16 Thread Steve Lichtenberg
Thanks. I found it finally. The right syntax (for this issue) is select count(distinct prodcode) as prodcnt There was a second issue with computed_field_1 the was being bounced by the ODBC driver as well. On Mon, Mar 16, 2009 at 3:54 PM, Jason Fisher wrote: > > This is invalid: > > distinct(

re: SQL Syntax error

2009-03-16 Thread Jason Fisher
This is invalid: distinct(count prodcode) Are you trying to do a DISTINCT on the aggregate function COUNT()? Not sure that would work, but it would have to be DISTINCT COUNT(prodcode) if that's what you're after. ~| Adobe

Re: SQL Syntax error

2009-03-16 Thread Steve Lichtenberg
I forgot the code snippet. select distinct(count prodcode) from product where product.manufid = '#scan.manufid#' AND product.famcode2 matches '#left(scan.famcode, 2)#.' ANDproduct.famcode2 matches '#left(scan.famcode,1)#..' AND

RE: SQL Syntax Error

2001-01-12 Thread Cornillon, Matthieu
h your database structure, and not your CF. If this doesn't work, we'll need that "incredibly annoying SQL syntax error" posted. Hope this helps, Matthieu > -Original Message- > From: Jann VanOver [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 11, 2001 4:55 PM &

RE: SQL Syntax Error

2001-01-11 Thread Jann VanOver
So, what was the "incredibly annoying SQL syntax error" ?? Did it give you any clues? Did you try ing the text of the query before executing to make sure it looks right? -Original Message- From: Erika Foster [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 03, 2000 7:42 PM To: CF-Talk

Re: SQL Syntax Error

2000-12-03 Thread David Cummins
Not knowing what types the fields or variables are, or what the setup is like, its a little hard to comment... However, one thing that springs to mind is does it require a username and password in the CFQUERY? David Cummins Erika Foster wrote: > > Hi there, > > I've got this whole application