Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Split up date in conditional split SSIS Expand / Collapse
Author
Message
Posted Thursday, March 21, 2013 5:55 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, May 17, 2013 6:02 AM
Points: 4, Visits: 19
Just now I have a date column with format of 2011-05-25 I would like to split this into three columns:

Year Month Day

2011 05 25

Can this be done using SSIS ? or even in SQL OLE DB?
Post #1433744
Posted Thursday, March 21, 2013 6:37 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 1:17 PM
Points: 4,234, Visits: 9,470
Check out the T-SQL Year(), Month() and Day() functions - you can do this at source.

____________________________________________________________________________________________

Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:

http://www.sqlservercentral.com/articles/Best+Practices/61537/

If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
Post #1433754
Posted Thursday, March 21, 2013 2:48 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 9:06 AM
Points: 9,367, Visits: 6,465
dario.quinn (3/21/2013)
Just now I have a date column with format of 2011-05-25 I would like to split this into three columns:

Year Month Day

2011 05 25

Can this be done using SSIS ? or even in SQL OLE DB?


TSQL is the easiest option, but if you're feeling adventurous you can also do it in a derived column using similar functions.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1434035
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse