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.
Author |
Topic |
sanjepau
Starting Member
5 Posts |
Posted - 2009-07-23 : 11:04:47
|
Hi All,Can anyone please let me know the expression we need to write in Derived column of SSIS package to get the last date of every month.Any help will be highly appreciated.RegardsSanjeev |
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-07-23 : 12:35:46
|
Will u expect like thisdeclare @i intset @i=1while @i<=12beginSELECT DAY(DATEADD(d, -DAY(DATEADD(m,1,cast(cast(@i as varchar(2))+'-01-2009' as datetime))),DATEADD(m,1,cast(cast(@i as varchar(2))+'-01-2009' as datetime))))set @i=@i+1endSenthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
|
|