> Hey, rudy, I think for one we solved an SQL problem without you!
i love it when that happens!
i am at the point in my life where i will often let an sql question go
unanswered for a few hours to see if others will pick it up
gotta make room for the new generation, dontcha know
> I am actually using option 3, which as you mentioned is a bit slow.
> Which option do you recommend then, none of them I suppose!
actually, option 1
WHERE datecolumn >= '2003-08-12'
AND datecolumn < '2003-08-13'
this is the fastest of all those options
usually you will want the query generalized for "current date"
WHERE datecolumn >= current_date
AND datecolumn < current_date + interval 1 days
oh, did i just give you standard sql syntax? heh
here's the access version:
WHERE datecolumn >= date()
AND datecolumn < dateadd("d",1,date())
it's important to use date() instead of now() in this instance
and remember, never use a function on the date column, always apply the
function to date() or now()
regarding datetime datatypes in access, thanks for confirming that a time
portion is always stored, david
this of course leads me to my next recommendation
if you have a column that's going to store a date, and you're going to do
the above type of query on it, and if there's no good reason to store the
time, then please, do yourself a favour, store the date and set the time
portion to zero/midnight
easiest way to do this? use date() instead of now() when inserting
then your query is even simpler --
WHERE datecolumn = date()
now *that* will *really* fly
;o)
rudy
____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
Send Your Posts To: [EMAIL PROTECTED]
To set a personal password send an email to [EMAIL PROTECTED] with the words: "set
WDVLTALK pw=yourpassword" in the body of the email.
To change subscription settings to the wdvltalk digest version:
http://wdvl.internet.com/WDVL/Forum/#sub
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]