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

Microsoft SQL Server 2008DB Reporting ToolsMicrosoft SQL ServerSSIS

Avatar of undefined
Last Comment
Barry Cunney

8/22/2022 - Mon
Jim Horn

>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

ASKER
CaptainGiblets

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
Barry Cunney

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck