Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2005
    Posts
    20

    Question Unanswered: SQLDATETIME in bcp file...

    Hi,
    i m using sql server 2005 YUKON...and in my format file i have one datetime column..the format of it is as follow bulk_format.fmt)

    9.0
    3
    1 SQLCHAR 0 12 "\t" 1 number SQL_Latin1_General_CP1_CI_AS
    2 SQLDATETIME 0 8 "\t" 2 date_time SQL_Latin1_General_CP1_CI_AS
    3 SQLCHAR 0 4 "\r\n" 3 alphabet SQL_Latin1_General_CP1_CI_AS


    and the format of my input data file is as follow:
    123458962365 07-08-2005 a
    567856984123 05-06-2009 b
    910236985475 02-08-2003 c
    356914589632 01-02-2000 d

    now,whenever i m trying to run this in CMD...it gives me the error as:
    Starting Copy...
    SQLState = 42000, NativeError=4896
    error= [microsoft][sql native client][sql server] Invalid column value from bcp client for colid 2
    BCP copy in failed.....

    So, now can anyone pleaseeeeeeeee tell me..how to deal with this????
    any help will be greatly appreciated...
    thnks..

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Why is your SQLDATETIME column defined as 8 characters in width in you format file? Your 2nd column is 10 characters wide.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

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