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.
Author |
Topic |
KindnessPays
Starting Member
1 Post |
Posted - 2013-01-28 : 18:46:53
|
Receiving a message 'can not convert between unicode and non unicode string data types. I'm using this command to create the field. Destination is a nvarchar.'IPSD' + RIGHT ('000000' + CAST(Staff_ID AS nvarchar(6)), 6) |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-01-28 : 18:50:51
|
Try one of these:'IPSD' + RIGHT ('000000' + CAST(Staff_ID AS varchar(6)), 6)N'IPSD' + RIGHT (N'000000' + CAST(Staff_ID AS nvarchar(6)), 6) |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-01-29 : 02:37:26
|
try using a derived column task or data conversion and do the casting inside itif derived column use(DT_WSTR,6) your column name------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|