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

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Microsoft SQL Server
Microsoft SQL Server

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

171K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo