You are here: Re: Import flat file into SQL Server 2005 Express « MsSQL Server « IT news, forums, messages
Re: Import flat file into SQL Server 2005 Express

Posted by cabrenner on 01/08/07 13:22

Thank you both for your suggestions. Yes, I was thinking that BULK
INSERT was not going to be able to handle this. I had thought about
dumping the file into an Access table first, but the file could be very
large (200,000+ rows). I am going to try the Excel spreadsheet idea.

Erland Sommarskog wrote:
> Erland Sommarskog (esquel@sommarskog.se) writes:
> > So a file could look like this:
> >
> > 2,34,Enter Sandman,Pat Boone
> > 9,34,Zabadak,"Dave, Dee, Dozy, Mich & Tich"
> > 8,981,"Rebel, Rebel",David Bowie
> >
> > There is now way to get BULK INSERT to handle this file in that shape.
> > If I were faced with this file, I would write Perl script that replaced
> > the commas outside the "" with a different delimiter and then removed the
> > "". And it would not be trivial.
>
> In addition to Bernard's post, is not Excel able to read that format?
> In such case open in Except, and save as a tab-delimited file and importing
> that should be a breeze. (Assuming, of course, there are no tabs in the
> data!)
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация