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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Using BCP to Import

Author  Topic 

minckle
Starting Member

2 Posts

Posted - 2007-08-06 : 06:54:59
Hi

I'm using the BCP facility to import a text file into a database. My problem is, in the table there are 10 fields but my file only contains data for 3 fields

e.g
Table - id,forname,surname,dob,gender,mob_number
File - forname,surname,mob_number

is there a way of only importing into the required fields or do i have to have columns in the order they are in, in the table????

can I use this file??
matt,jones,0775446644
chris,jones,066565465

or do i have to use this???
,matt,jones,,,0775446644
,chris,jones,,,066565465

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-08-06 : 12:43:54
Should use second one. By the way, do other columns accept null value?
Go to Top of Page
   

- Advertisement -