We do quite a lot of date range queries, and use a mixture of the two.
Can't say I've noticed any difference in performance, and they both work
fine.

> Hi Brian,
> 
> Using SQL Server you could do it like this
> 
> where         datePart(YEAR, myDate) =3D #arguments.year#
>       and datePart(MONTH, myDate) =3D #arguments.month#
> 
> I'm not sure if it's more efficent, but I find it pretty easy to read.
> 
> Pete
> 
> >>> [EMAIL PROTECTED] 08/20/03 07:37am >>>
> What the best way to selected a months work of dates from a table. For
> example I want to select all orders for April 2003.
> 
> Presently I create a 2 variables call start and end date.  These might be
> 01/05/2003 and 01/06/2003 and then use these in the SQL where clause ie
> where order_date >=3D #variables.state_date# and order_date <
> #variables.end_date#.  I have left out the createodb bits.
> 
> Brian Knott
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> au=20
> 
> MX Downunder AsiaPac DevCon - http://mxdu.com/

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to