Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Varchar2

Author  Topic 

joseph1975
Starting Member

6 Posts

Posted - 2012-02-20 : 16:04:58
I have a field called Status as varchar2. I was trying to update as

update table1 set Status = 'Not/Good-OK'

Gives me an error
Msg 8152, Level 16, State 14, Line 1
String or binary data would be truncated.
The statement has been terminated.

How to update the same string to the field?
Please help.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-02-20 : 16:11:44
there's no varchar2 in sql server. Are you using oracle?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

joseph1975
Starting Member

6 Posts

Posted - 2012-02-20 : 16:14:52
Got that fixed. used varchar.
The problem was witht the size. I declared as varchar(5).my bad..
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-02-20 : 16:26:16
ok...cool
then you had the question also wrong

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -