Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2005
    Location
    Jersey
    Posts
    47

    Unanswered: BCP template using quoted text qualifiers

    I'm dumping data from a table via BCP and when BCPing them back in to another table, it errors out on numeric and date fields. I'd like to place quote marks on the text fields. How do I do this using BCP?

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    I'd say the other table does not match your structure of the first table

    Where's the bcp command and the DDL of the tables.
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Nov 2005
    Location
    Jersey
    Posts
    47

    BCP Quotes

    The tables are exactly the same. They are duplicates of one another just in different databases.
    When I tried to manually import the file that that was exported using BCP I got the error stating that I was trying to put a string into a numeric field. When I exported the table manually with quotes, I had no problem importing it in to the other table.
    Do you know how to export a table with the quotes around the text in the file using bcp?

  4. #4
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    You can either:
    - create a view or;
    - create a procedure.

    Within either you can embed any character to be part of the data you're trying to export. If it's a view, - use OUT, else - QUERYOUT.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  5. #5
    Join Date
    Nov 2005
    Location
    Jersey
    Posts
    47

    BCP quote issue

    So there is no switch with the bcp command to put in quotes?

Posting Permissions

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