I am using access 2000. I tried replacing "d" with both "dd" & "day"
neither worked.
I can get records when I go by just one date but not over a given time
period. I need to get records that were created in the last 30 days.
the variable dos is a date stamp that is in the table.
Dominic
At 01:26 PM 10/24/00 +0100, you wrote:
>Are you using SQL server? If so cut and paste the SQL into query Analyser
>and run it replacing the variabls with their values. First find out exactly
>what values are being passed to the query. I'm not sure you need to use
>CreateODBCDate....try doing it just passing in 2 strings containing valid
>dates and use the SQL CONVERT function to get into dates.
>
>Did you try replacing "d" with "dd" or "day"?
>
>------------------------------------------------------------------
>Andrew Ewings
>Project Manager
>Thoughtbubble Ltd
>http://www.thoughtbubble.net
>------------------------------------------------------------------
>United Kingdom
>http://www.thoughtbubble.co.uk/
>Tel: +44 (0) 20 7387 8890
>------------------------------------------------------------------
>New Zealand
>http://www.thoughtbubble.co.nz/
>Tel: +64 (0) 9 419 4235
>------------------------------------------------------------------
>The information in this email and in any attachments is confidential and
>intended solely for the attention and use of the named addressee(s). Any
>views or opinions presented are solely those of the author and do not
>necessarily represent those of Thoughtbubble. This information may be
>subject to legal, professional or other privilege and further distribution
>of it is strictly prohibited without our authority. If you are not the
>intended recipient, you are not authorised to disclose, copy, distribute, or
>retain this message. Please notify us on +44 (0)207 387 8890.
>
>
>
>-----Original Message-----
>From: Dominic J. Doucet-Lorang [mailto:[EMAIL PROTECTED]]
>Sent: 24 October 2000 13:22
>To: CF-Talk
>Subject: RE: query problem
>
>
>Andy,
>it gives me no returns even when there are 2 possible returns it should be
>returning. I have set up 2 records that should match the query tests. I
>am no longer getting the syntax error I was.
>
>Dominic
>
>At 01:08 PM 10/24/00 +0100, you wrote:
> >Try putting hashes around dos and using = rather than LTE. You also have a
> >bracket missing around your ABS function like so:
> >
> ><CFQUERY name="getkundeinfo" datasource="abx2" dbtype="ODBC">
> > select distinct forsikring.*,kunde.*
> > from forsikring, kunde
> > where kunde.kundenr = #kundenr2# AND forsikring.id = #salg# AND
> > forsikring.id = kunde.id and Abs(datediff("d", #dos#, #dos2#)) =
>30
> ></CFQUERY>
> >
> >If this doesn't work try replacing the "d" in the datediff function with
> >"dd" or "day"
>
>----------------------------------------------------------------------------
>--------------------
>Archives: http://www.mail-archive.com/[email protected]/
>Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
>message with 'unsubscribe' in the body to [EMAIL PROTECTED]
>------------------------------------------------------------------------------------------------
>Archives: http://www.mail-archive.com/[email protected]/
>Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send
>a message with 'unsubscribe' in the body to [EMAIL PROTECTED]
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]