Solved

importing data from text file

Posted on 2009-05-13
2
312 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

691 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