0

I have defined an nvarchar(50) column inside my SQL Server 2008 table. But when I tried to manually enter a value which is 50 characters long using the SQL Server 2008 Management Studio, I got the following error :-

Occured.String or binary data would be truncated. The statement has been terminated.

So why I am unable to enter a 50 character long value inside an nvarchar(50) column ?

Crono
  • 10,211
  • 6
  • 43
  • 75
John John
  • 1
  • 72
  • 238
  • 501
  • 2
    can you show the SQL statement that failed ?? – BWS Feb 19 '14 at 14:28
  • no sql statement i just add the record manually using the sql server studio . edit top 200 , then i enter the value manually ... – John John Feb 19 '14 at 14:30
  • You were forced to misspell your title because other questions exist whose titles are exactly that error. Did you read those? I don't know if they're exactly your situation, but they could be a good starting point. – jonhopkins Feb 19 '14 at 14:31
  • 2
    can you update the record by using an SQL statement (using the same 50-char text) ? – BWS Feb 19 '14 at 14:32
  • Are you sure there are not spaces after your 50? – paparazzo Feb 19 '14 at 14:34
  • possible duplicate of [SQL error: String or binary data would be truncated](http://stackoverflow.com/questions/1888666/sql-error-string-or-binary-data-would-be-truncated) – Crono Feb 19 '14 at 14:35
  • @Blam yes this is the number 12345678912345678912345678912345678912345678912345 – John John Feb 19 '14 at 14:45
  • 1
    Refresh the table in SSMS to check that it is in fact nvarchar(50). – TTeeple Feb 19 '14 at 15:04
  • you are right i close then i re-open the Sql studio and it worked well.. – John John Feb 19 '14 at 15:05

0 Answers0