SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 date
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kemi2299
Starting Member

United Kingdom
41 Posts

Posted - 04/18/2008 :  10:55:07  Show Profile  Reply with Quote
hi,

could you pls help in defining date statement in tsql

UPDATE #stemp42
SET start_date_flag=1
WHERE Admiss_Dt>='01-jan-2004'
AND Admiss_Dt < DATE('day');

SwePeso
Patron Saint of Lost Yaks

Sweden
30249 Posts

Posted - 04/18/2008 :  11:33:21  Show Profile  Visit SwePeso's Homepage  Reply with Quote
UPDATE #stemp42
SET start_date_flag=1
WHERE Admiss_Dt>='01-jan-2004'
AND Admiss_Dt < GETDATE()



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22760 Posts

Posted - 04/19/2008 :  03:28:57  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
What does DATE('day') do?

UPDATE #stemp42
SET start_date_flag=1
WHERE Admiss_Dt>='01-jan-2004'
AND Admiss_Dt < dateadd(day,datediff(day,0,GETDATE()),0)

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000