ERROR:String or binary data would be truncated.

  • Hi,

    Server: Msg 8152, Level 16, State 4, Line 1

    String or binary data would be truncated.

    The statement has been terminated.

    This error happen when I tried to insert a value in a nvarchar column:

    Insert into customers(customerId,customername,postcode)

    values ('CU0O3','Dinesh prasad','GU240PS')

    how can solve this error?

  • One of the items you are trying to insert is too long for your declared column size. Check the lengths against your field lengths.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • Thank you. Length of customername was too small.

    it was customername nchar(10)

    now changed .Thank you

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

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