Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2005
    Posts
    20

    Unhappy Unanswered: BCP - Hint exceeds

    Query hints exceed maximum command buffer size of 1023 bytes(1029 bytes input).

    i tried a long query in BCP because i have to insert a character to one of its fields.

    hope somebody had encountered and solved this (sql server 2000). thanks in advance..

  2. #2
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    what's your bcp command line?

  3. #3
    Join Date
    Aug 2005
    Posts
    20
    here...

    bcp "Select 'A'+Customer_Code, PFW_Customer_Code, Newsys_Customer_Code, SBT_Customer_Code, BM_Customer_Code,

    Customer_Class_Code, Customer_Company_Name, Customer_Market_Name, Contact_Person_Name, Contact_Person_Position,

    Contact_Person_Contact_Number, Contact_Person_Fax_Number, Contact_Person_Email_Address, Customer_Delivery_Address,

    Customer_Market_Type_Code, Customer_Market_Cluster_Code, Customer_Level_Code, Customer_Location_Code,

    Customer_Route_Name, Customer_CreditLimit, Customer_Status, Customer_Status_Decription, Customer_Auto_Approve,

    Customer_Set_Code, Customer_Receipt_Type, Customer_Outstanding_Balance, Customer_Available_Balance,

    Customer_Last_Order_Date, Customer_Last_Order_Amount, NewSys_Customer_Salesman_Code, OnHold_Status, OnHold_Date,

    OnHold_Remarks, AR_CashAccountCode, AR_CashAccountDesciption, Create_User_Code, Create_Date, Modify_User_Code,

    Modify_Date, Status, SpareField1, SpareField2, Remarks1, Remarks2, newsys_terms_fpm, newsys_terms_gp,

    newsys_terms_ham from CDO_MAIN..GenMKT_Customer_Masterfile" out c:\GenMKT_Customer_Masterfile.txt -t, -f

    c:\GenMKT_Customer_Masterfile.xml -S10.10.1.8 -Usa -Psa

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Perhaps you could make that into a view in SQL Server, and just bcp out the view?

  5. #5
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    you should be using queryout, not out.

  6. #6
    Join Date
    Aug 2005
    Posts
    20
    wrong code, i already replaced it with queryout but still fails...thus view in sql server runs bcp?

  7. #7
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    in that case I would do as mcrowley suggests. create a view, and then run this bcp:

    bcp CDO_MAIN..YourView out c:\GenMKT_Customer_Masterfile.txt -t, -f c:\GenMKT_Customer_Masterfile.xml -S10.10.1.8 -Usa -Psa

  8. #8
    Join Date
    Aug 2005
    Posts
    20
    Thanks a lot MCrowley & jezemine!!!

  9. #9
    Join Date
    Mar 2005
    Location
    Netherlands
    Posts
    280
    Quote Originally Posted by jezemine
    -Usa -Psa
    But first you should change the sa-password, put it in a vault somewhere and only use it in emergencies...

Posting Permissions

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