Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 DATETIME NULL

Author  Topic 

Anand.A
Posting Yak Master

109 Posts

Posted - 2011-11-30 : 00:41:03
HI

in my ssis...i want to compare load_date to create date..but my 1st run my load date is empty

so that i used isnull function in ssis

ISNULL(load_date) ? GETDATE() : load_date

this query i got success

but i need
ISNULL(load_date) ? 01/01/1111 : load_date

so i compare any previous date to my today load_date how to write this condition in ssis

anand

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-11-30 : 01:26:50
try
(DT_DBDATE)"01/01/1111"

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

jassi.singh
Posting Yak Master

122 Posts

Posted - 2011-11-30 : 01:34:06
Check this

DECLARE @dt DATETIME
SET @dt = '11/11/2011'
SELECT CASE WHEN @dt IS NULL THEN GETDATE() ELSE @dt END
Go to Top of Page
   

- Advertisement -