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: Thursday, August 08, 2013 3:17 AM
Points: 4, Visits: 23
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 @ 4:25 AM
Points: 4,828, Visits: 11,184
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 @ 4:35 AM
Points: 12,208, Visits: 9,172
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