Solved

importing data from text file

Posted on 2009-05-13
2
305 Views
Last Modified: 2013-11-30
HI, i have a notepad with data like this -

"CUS_ORD","ID","C_NAME","C_ADR_1","C_ADR_2","C_ADDR_I1","C_ADDR_I2","C_ADDR_I3","White Comapny V"
"CAB",4,"Mrs Louisa Henriques","Chaleshurst","Petworth Road","Chiddingfold","Nr Godalming","GU8 4ST","X"
"BAC",6,"Mrs Pop Frisby","Rosalie Farm","Cowlinge","Newmarket","Suffolk","CB8 9HU","X"
"BAB",7,"Mrs Sophie Horton","18 Vine Court  Road","Sevenoaks",,"Kent","TN13 3UY","X"
"BAC",12,"Mrs K Kinsky","42 Boscombe Road","London",,,"W12 9HU","X"

when i try to import the data into SQL Server 2005 using import and export wizard, i have used flat file source and loaded the data
into the database.. but my data in the table appears as it is in the source file as below -
 
"custid" "ID"   "custname"
"BAC"      10595      "Mrs Gilly Cowley"
"GAB"      10596      "Mrs Sara Beare"
"GAB"      10597      "Mrs Gina Cernuschi"

can anybody tell me how do i get rid of " " both in Column and rows ?

Many thanks
0
Comment
Question by:gvamsimba
2 Comments
 
LVL 13

Accepted Solution

by:
St3veMax earned 500 total points
ID: 24376136
If this is a one-time import; the easiest way would be to clean up your source before you import it; i.e. do a find and replace and replace " with nothing.

HTH
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24376214
attach here the an exact example of your flat file and I will create a SSIS Example for you!
Regards,
Pedro
www.pedrocgd.blogspot.com
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how the fundamental information of how to create a table.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now