No no FoxPro is all foxed up this is how you would have to query it. <cfquery name="getpo" datasource="PO"> select ponumber, supplier,odr_date from purchase where odr_date > ctod('12/10/01') </cfquery>
-----Original Message----- From: Don Vawter [mailto:[EMAIL PROTECTED]] Sent: Friday, December 14, 2001 9:13 AM To: CF-Talk Subject: Re: Querying FoxPro Date It's been a few years but I think this might work <cfquery name="getpo" datasource="PO"> select ponumber, supplier,odr_date from purchase where odr_date > {12/10/2001} </cfquery> ----- Original Message ----- From: "Michael Haggerty" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Friday, December 14, 2001 8:34 AM Subject: RE: Querying FoxPro Date > Just a stab in the dark, is that the query you are actually running? The > double quotes before the date are actually a pair of single quotes. > > I have no experience with FoxPro, but the query you posted will not run > under SQL Server. Change the single quotes to read like this and you should > be alright: > > WHERE odr_date > '12/10/01' > > Mike > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, December 13, 2001 4:35 PM > To: CF-Talk > Subject: Querying FoxPro Date > > > How can you select records for a FoxPro date by using date? > > The query: > > <cfquery name="getpo" datasource="PO"> > select ponumber, supplier,odr_date > from purchase > where odr_date > ''12/10/01" > </cfquery> > > > It returns with the error: > > ODBC Error Code = 22005 (Error in assignment) > [Microsoft][ODBC Visual FoxPro Driver]Operator/operand type mismatch. > > In SQL, it works fine. But the DB will be in FoxPro > > When I select all and out the date, the date format is in yyyy-mm-dd. I > tried using that format, but no luch either. > > Any clues? > > Thanks > Jacob > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm 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