Solved

importing data from text file

Posted on 2009-05-13
2
306 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

930 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

12 Experts available now in Live!

Get 1:1 Help Now