trudye10
Programmer
- Sep 8, 2006
- 67
Hey Guys, I'm new to SQL Server and I have a question. I am trying to do concatenate 2 fields and 1 value into a new field.
Division (nvarchar(2), null)
Acct_Number (Nvarchar(11), null)
Account_Number (nvarchar(20), null)
I tried the following statement:
I recieved the following error msg:
Msg 8152, Level 16, State 13, Line 1
String or binary data would be truncated.
The statement has been terminated.
What pray-tell am I doing wrong?
Thanx,
Trudye
Division (nvarchar(2), null)
Acct_Number (Nvarchar(11), null)
Account_Number (nvarchar(20), null)
I tried the following statement:
Code:
update dbo.MCF
set Account_Number =
CASE
WHEN DIVISION = 30 then (Division) + '00000000' + (Acct_Number)
ELSE (Division) + '0000000' + (Acct_Number)
END
I recieved the following error msg:
Msg 8152, Level 16, State 13, Line 1
String or binary data would be truncated.
The statement has been terminated.
What pray-tell am I doing wrong?
Thanx,
Trudye