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
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 conditional split

Author  Topic 

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-04-21 : 15:10:29
i write this condition in conditional split,but the ssis dont like it .and sql like it.
this condition:

CurDate>=(dateadd("mm",-3,getdate())-(datepart("dd",dateadd(mm,-3,getdate()))))


he didnt like in the bold.

thanks

rgombina
Constraint Violating Yak Guru

319 Posts

Posted - 2009-04-22 : 10:35:55
What is the error.
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-04-22 : 10:42:12
i get error very long.

he dont like the diff between date dateadd("mm",-3,getdate()) and day :(datepart("dd",dateadd(mm,-3,getdate()))))
Go to Top of Page

rgombina
Constraint Violating Yak Guru

319 Posts

Posted - 2009-04-22 : 11:10:43
day :(datepart("dd",dateadd(mm,-3,getdate()))))
to
day :(datepart("dd",dateadd("mm",-3,getdate()))))
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-04-23 : 04:38:43
i dont see the difference
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-04-23 : 04:42:05
What is your objective with the formula?
To get last day of the month four months back?


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

rgombina
Constraint Violating Yak Guru

319 Posts

Posted - 2009-04-27 : 08:21:30
datepart("dd",@[User::CurDate])>=datepart("dd",(dateadd("mm",-3,getdate())))

Are you just comparing day count?
Go to Top of Page
   

- Advertisement -