i will assume quarter is another column therefore you are missing a comma.
try: <cfquery name="Sales" datasource="spattest"> SELECT DISTINCT SalespersonID, SalesAmount, Quarter FROM tblSales Where Quarter = 1 </cfquery> ----- Original Message ----- From: "David Douglas" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, January 24, 2002 9:26 AM 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.ffQuarter# 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 criteria > expression. > > > SQL = "SELECT DISTINCT SalespersonID, SalesAmount, Quarter FROM tblSales > 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 > ______________________________________________________________________ Why Share? Dedicated Win 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=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists