Hello,

I tried it with single quotes and same error.  Then I looked at DB de
sign
and saw it was text, so I changed it to number and now it works.

Thanks


----- Original Message -----
From: "Mark A. Kruger - CFG" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, January 24, 2002 11:29 AM
Subject: RE: Data Mismatch and Looping Distinct Results


> I'd say the datatype for quarter is not an int or number - trye usi
ng
single
> quotes:
>
> where quarter = '1'
>
> -----Original Message-----
> From: David Douglas [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 24, 2002 6:27 AM
> To: CF-Talk
> Subject: Data Mismatch and Looping Distinct Results
>
>
> Morning All,
>
> 2 issues are bugging (hehe) me on an overnight basis now.
> my code:
>
> <cfquery name="Sales" datasource="spattest">
> SELECT
>  DISTINCT SalespersonID,
>  SalesAmount
>  Quarter
> FROM tblSales
> Where Quarter = 1 <!---OR I want it to say Quarter = #Form.ffQu
arter# so
> users can choose the quarter to view--->
> </cfquery>
>
> that query is coming back with:
> ODBC Error Code = 22005 (Error in assignment)
>
>
> [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in cri
teria
> expression.
>
>
> SQL = "SELECT DISTINCT SalespersonID, SalesAmount, Quarter FROM t
blSales
> Where Quarter = 1"
>
> BUT when I drop the Where clause it works fine. !!!!!!!
>
> The other thing was more of a recommendation on how I should get a 
total
for
> each Salesperson ID from query  results
>
> CFLOOP perhaps??
>
> Thanks for all the assistance this list has always provided me with
,
>
> -Dave
> _________________________
> _________________________
> ____________________
> Get Your Own Dedicated Windows 2000 Server
>   PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
>   Instant Activation � $99/Month � Free Setup
>   http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
> ___________________________________________________________________
___
> Dedicated Windows 2000 Server
>   PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
>   Instant Activation � $99/Month � Free Setup
>   http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to