Friday, February 10, 2012

Comma delimited file into SQL

Hello,
I have a comma delimited file where data for each field is in " ".
I use Bulk Insert to import the file into SQL table.
How do I get rid of " " ?
thank you.UPDATE MyTable SET MyCol = REPLACE(MyCol, '"', '')
I usually like to get rid of double-quotes or other legacy problems before a
BULK INSERT with a text editor or a script... Generally more efficient that
way.
"Lena" <anonymous@.discussions.microsoft.com> wrote in message
news:57F89BBC-0268-439D-B55F-350617771BC5@.microsoft.com...
> Hello,
> I have a comma delimited file where data for each field is in " ".
> I use Bulk Insert to import the file into SQL table.
> How do I get rid of " " ?
> thank you.|||You can make a nice little format file to handle the quoted text identifier.
I found a great little thread for you here:
http://groups.google.com/groups?sel...2%40tkmsftngp07
Christopher Winn
Business Intelligence Engineer
Edugration Corp.
Books
"Lena" <anonymous@.discussions.microsoft.com> wrote in message
news:57F89BBC-0268-439D-B55F-350617771BC5@.microsoft.com...
> Hello,
> I have a comma delimited file where data for each field is in " ".
> I use Bulk Insert to import the file into SQL table.
> How do I get rid of " " ?
> thank you.

No comments:

Post a Comment