Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Importing csv Files with missing columns

Author  Topic 

Nemisis
Starting Member

8 Posts

Posted - 2008-09-02 : 11:35:09
Hi everyone,
Can anyone suggest to me the best way to go about importing a csv file, that may or may not have particular columns into a database.

eg. file1 may have columns CompanyRef, CompanyName, CompanyTown
file2 may have columns CompanyName, CompanyPostcode, Status

I have read the documentation on both BULK INSERT and bcp and i believe that they need all columns in the file.

Does anyone know how i could go about this? I read something about SSIS packages, but can i get the functionality that i require from this either?

Thanks in advanced

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-04 : 03:37:59
will you be having headers in your csv file?
Go to Top of Page
   

- Advertisement -