SQL Job failed

  • Hello Team,

    I am getting the below error while running the new job.Help me to  resolve  this issue.

    Error Message :

    Starting copy... SQLState = 22001, NativeError = 0 Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation.

    Using below bcp command when  i am trying to run the job :

    bcp PatsDB.dbo.Sharepoint in Sharepoint.txt /S USFLMIAD-DB01 /Ucensus_admin /PCA1934 /f Sharepoint.fmt

     

    I am attaching data file also which i am trying to insert.kindly help me regarding to solve this issue.

     

    Attachments:
    You must be logged in to view attached files.
  • What is the structure of the table you are importing this data into?

    It appears that the column length of this table is too small.

     

    And, are you really using SQL 7 or 2000?

     

    And did you just publish a username and password to the internet?

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • Hello Mike,

     

    Please find the below attached the table structure .

    Below your questions my answers below :

    It appears that the column length of this table is too small.

    A.)First columns length -6 and second column length:8000(varchar both)

    And, are you really using SQL 7 or 2000?

    A.) I am using SQL 2000

     

    Let me know any thing required and what is the root cause for this issue?

    Attachments:
    You must be logged in to view attached files.
  • There are a few possibilities.

    1. The data in the .txt file you are importing contains characters that the format file does not handle.  Does the file attached contain all of the rows you are attempting to BCP in, or is this a sample?

    2. The format file is incorrect.

    3. Have you tried a different method?

     

     

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

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

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