Error in BCP

  • Hi,

    I am using this simple BCP command and having a hard time to get it working. Please Help-

    exec master.dbo.xp_cmdshell 'bcp DBname..Item in D:\ItemTop100.bcp -c -T -S servername'

    I get the below error

    SQLState = 37000, NativeError = 170;

    Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '/'.

    Thanks

    Dev

  • Can you post your table structure and a couple sample lines of the input file? This is most likely a data problem in your file with the / character appearing out of place somewhere.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • Seems like the table structure. I have a column named 'Source/Class' could this be causing a problem?

    Thanks

    Dev

  • I'm not sure that's it. I created a table w/ a column name Col2/Name and I was able to BCP into it just fine.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • Well, are you going to post your table DDL and sample data?

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply