[dba-SQLServer] Errors importing CSV

Stuart McLachlan stuart at lexacorp.com.pg
Sun Jan 14 22:17:01 CST 2007


First thing I'd do is open a problem CSV file in something like NoteTab or Crimson Editor. 
Take a close look at the first line which is throwing a problem.  
That should tell you what is causing it and you can take necessary corrective action.
 


On 14 Jan 2007 at 23:04, JWColby wrote:

> I have several machines.  One machine has SQl Server 2K installed, another
> has SQL Server 2005.  I have a bunch of largish csv files, with ~2.1 million
> records each which I need to import.  The SQL Server 2K database has always
> been able to import these things in the past, in fact still can import a
> certain subset of the files, but is consistently getting "missing field
> delimiter" at some point in the majority of these files.  What record it
> says is bad varies from file to file, but is repeatable (same record) in any
> given file. 
>  
> These same files import just fine in SQL Server 2005, no errors at all.
>  
> Is 2005 simply more forgiving, automatically dropping any records which have
> missing field delimiters, or is 2K screwing something up?  I have done a
> bunch of these imports and suddenly am having problems.  Any file with a
> problem always has the problem, and any file that imports successfully will
> always import successfully so I suspect that there are actual bad rows in
> the files.
>  
> IK am using the wizard in all cases, 2K and 2005
>  
> John W. Colby
> Colby Consulting
> www.ColbyConsulting.com
>  
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
> 





More information about the dba-SQLServer mailing list