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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SSIS package can't convert between unicode and non
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 01/28/2013 :  18:46:53  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

3873 Posts

Posted - 01/28/2013 :  18:50:51  Show Profile  Reply with Quote
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)
Go to Top of Page

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 01/29/2013 :  02:37:26  Show Profile  Reply with Quote
try using a derived column task or data conversion and do the casting inside it

if derived column use

(DT_WSTR,6) your column name

SQL Server MVP

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000