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: Monday, June 2, 2014 4:52 AM
Points: 4, Visits: 24
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


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 8:22 AM
Points: 5,045, Visits: 11,794
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.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1433754
Posted Thursday, March 21, 2013 2:48 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:57 PM
Points: 13,606, Visits: 10,490
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