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 2012 Forums
 SSIS and Import/Export (2012)
 How to seperate one column into two

Author  Topic 

brubakerbr
Yak Posting Veteran

53 Posts

Posted - 2013-08-27 : 11:39:30
I am currently working with a .txt file that looks like this. (there is a space in front of the first bracket)

| Column 0 |
| 01/01/2013 | 123.56 |
| 02/12/2013 | 25.34 |

The data is coming into SQL into one column. I tried to set the Delimiter to a "bar" but it still will not split the column. I assume there is a space in the front of the bar so it is not recognizing it.

I need to separate this column into 2 separate columns one for "Date" the other for "Total". Using SSIS, what would be the best way to do this? I need SSIS as I will be doing some other transforms on this data once it is separated.

Brian D. Brubaker
Business Intelligence Analyst
Viega LLC

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-08-28 : 01:19:01
use flat file source and use delimiter as (space)|(space)

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -