all groups > sql server new users > august 2005 >
You're in the

sql server new users

group:

select date >= today?


select date >= today? _adrian
8/29/2005 4:44:36 PM
sql server new users:
Lets try this again, this time with the content...

So I need to write a select statement in my VBScript/ASP that will return
all records where the date field is = or > 'today'.. whatever that day
happens to be. I suppose if I could do it in a View, I can build from that
too.. in either case, does someone have a tutorial they can point me to? Am
using SQL 2000.. .thx

Re: select date >= today? Kevin Thomas
8/29/2005 5:06:37 PM
select * from myTable where myDate >= convert(varchar,getdate(),111)

That oughta do the trick,

Kevin

[quoted text, click to view]

Re: select date >= today? Tom Moreau
8/29/2005 8:08:18 PM
I assume that you define today as midnight this "morning". Therefore, try:

select
*
from
MyTable
where
[Date] > = convert (char (8), getdate(), 112)

--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
[quoted text, click to view]
Lets try this again, this time with the content...

So I need to write a select statement in my VBScript/ASP that will return
all records where the date field is = or > 'today'.. whatever that day
happens to be. I suppose if I could do it in a View, I can build from that
too.. in either case, does someone have a tutorial they can point me to? Am
using SQL 2000.. .thx

AddThis Social Bookmark Button