Link to home
Start Free TrialLog in
Avatar of CaptainGiblets
CaptainGibletsFlag for United Kingdom of Great Britain and Northern Ireland

asked on

SQL SSIS

I want to import text documents into sql however it doesn't come in a CSV format and I cant change this.

we receive all files in the attached format. The only thing is that the amount of rows of data between each column can change. I want to insert all the lines of data into 1 column with just a space between line breaks.  Is this possible and how would I go about doing? I have basic knowledge of SQL but nothing advanced.


Contact name:	
data data data	
Company:	
company name goes in here
Address:	
address
address
address
Notes:
around 10 lines of notes could be placed into here.	

Open in new window

Avatar of Jim Horn
Jim Horn
Flag of United States of America image

>I want to insert all the lines of data into 1 column
No problem.  Just map it to a destination that has only one column.

>with just a space between line breaks.
You'll probably want to import it as-is first, then run T-SQL to remove line breaks that goes somethign like this...

UPDATE YourTable REPLACE(column_name, char(13), ' ')

Open in new window

Avatar of CaptainGiblets

ASKER

I can have random text either before the information that I need to receive as well though. Wont that just create 1 massive line of text? so how would I find what I want and move it in to the corresponding column?
ASKER CERTIFIED SOLUTION
Avatar of Barry Cunney
Barry Cunney
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial