Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File Import Problem
Message
De
26/10/2008 14:32:25
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01357187
Message ID:
01357241
Vues:
13
How are you actually doing the import? In .NET? Are you doing SQL bulk inserts? Have you tried any Google searches? (I found lots of hits with a Google search string of "SQL Server import CSV files").

Part of solving the problem is knowing what you're currently doing that's working ok, except for these extra commas.

~~Bonnie




>I'm trying to import a CSV file into SQL. I have the SQL code working, then I found out that the file has commas embedded in the data:
>
>
>3000 Server - N4000,A6914CR,"3000 Server - N4000 - 1-way, 500MHz",A3639-67021,Electronic Parts,Cable Kit
>
>
>Notice that the third data item is enclosed in quotes and has a comma in it, so when the SQL batch import code runs, it brings the data in wrong.
>
>The question is, how do I clean up this data. There is going to be many files, with 5000+ rows each.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform