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)
 ACCESS to SQL works. But not BCP to SQL

Author  Topic 

Shanew
Starting Member

20 Posts

Posted - 2009-05-06 : 01:47:47
Hello,

I have a CSV flat file that for the past few years was imported into Access and used with in Access.
In the past month I have been tasked with converting the tables and queries over to SQL Server
tables and Views and it has worked well. Here is the odd and crazy part: the woman that normally
imports the csv file into Access has now been just importing from Access to SQL Server and it works
fine... I'm trying to move things off Access, so I told and showed her how to import directly into SQL.
But it keeps failing.

For instance, the CSV file is like this:
FNAME(var) - LNAME(Var) - AGE(int)
Shane Smith 41
Bob Hall 23
Danny Slape x49z

In Access it imports record 3, but not the AGE field as it is an INT. But when I try using SQL import(Bulk copy) it fails to do as it is trying to push a Varchar into an INT.

The bigwigs don't care if we don't always get the age field but they still want the record.

Is there a way to tell SQL BCP/Import to do as Access does, and just skip that field, but not the record?

Thanks for any help / Tips!
Shane


Shane Weddle
www.TechKnowPros.com

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-05-07 : 02:03:03
No need to create duplicate posts
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=125189



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -