Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Posts
    2

    Unanswered: BCP Error with Key Field Name

    Hi I have a table with the following structure

    ID Int,
    Key nVarchar2(50),
    Text nText,
    upsizeTS TimeStamp

    I want to use BCP to import some data,

    it always gives me the following error:
    SQLSTATE = 37000, native error 156
    Incorrect syntax near the keyword 'Key'

    There is no way I can change the name of the field to something else.

    Could anybody tell me why am I getting this error ?
    Thank you in advance.

  2. #2
    Join Date
    Aug 2003
    Location
    Delft, The Netherlands (EU)
    Posts
    447

    Re: BCP Error with Key Field Name

    You have chosen two column names, which are also reserved words: key and text. You will have to put [] around any occurence of these two column names in your script, e.g. [key] instead of key, and [text] instead of text.
    Make everything as simple as possible, but not simpler! - A. Einstein
    DB Problems? DB Explorer, BTrieve Re-engineering, DB Conversions & ETL? Conversion Tool

  3. #3
    Join Date
    Sep 2003
    Posts
    2

    Re: BCP Error with Key Field Name

    How do I do that, what script are you talking about. I am using a BCP command.


    Originally posted by DoktorBlue
    You have chosen two column names, which are also reserved words: key and text. You will have to put [] around any occurence of these two column names in your script, e.g. [key] instead of key, and [text] instead of text.

  4. #4
    Join Date
    Aug 2003
    Location
    Delft, The Netherlands (EU)
    Posts
    447

    Re: BCP Error with Key Field Name

    Post your BCP command.
    Make everything as simple as possible, but not simpler! - A. Einstein
    DB Problems? DB Explorer, BTrieve Re-engineering, DB Conversions & ETL? Conversion Tool

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •