none
bcp query - Unknown argument 'ûf' on command line.

    Question

  • I'm using bcp to Import data to a SQL 2000 server. it runs fine on the server, and was running fine on my PC. But I am trying to update the script, and can't get bcp to work on my PC anymore (win XP, SQL 2005 express).

    I have to add the -S switch for it to work on my PC (not needed on the server) but apart from that everything else should be the same. But when I run the query:

    bcp OU_PROD.dbo.Abc2 IN “c:\test\outbox\processed\abcimport2.csv” -S PC00570\SQLEXPRESS -T –f "c:\test\scripts\CSVImport\Abc2-c.fmt"

    I get

    Unknown argument 'ûf' on command line

    I'm sure this used to work fine. what am I missing?
    Monday, November 30, 2009 2:44 PM

Answers

  • bcp OU_PROD.dbo.Abc2 IN “c:\test\outbox\processed\abcimport2.csv” -S PC00570\SQLEXPRESS -T –f "c:\test\scripts\CSVImport\Abc2-c.fmt"

    In your command line, where it says "-f", the "-" part of it looks to be a unicode value. Please replace this with a normal dash and it should work!

    -Sean
    Monday, November 30, 2009 2:53 PM

All replies

  • bcp OU_PROD.dbo.Abc2 IN “c:\test\outbox\processed\abcimport2.csv” -S PC00570\SQLEXPRESS -T –f "c:\test\scripts\CSVImport\Abc2-c.fmt"

    In your command line, where it says "-f", the "-" part of it looks to be a unicode value. Please replace this with a normal dash and it should work!

    -Sean
    Monday, November 30, 2009 2:53 PM
  • You've obviously got better eyesight than I have. I changed all the quote marks, knowing that Word would mess them up, but didn't think about the dash's.


    Cheers
    Tuesday, December 01, 2009 9:44 AM