June 25, 2009 at 11:12 am
Hi
Could you please tell me if it is possible to use a data conversion transformation from nvarchar to int??
My data needs such a transformation as my manager does not want to change either of these datatypes.
Thank you
June 25, 2009 at 11:13 am
yes it is possible, obviously it will only convert the numeric part of the nvachar string
June 25, 2009 at 9:23 pm
You cannot do it directly .You need to convert it to varbinary first .
begin
declare @num nvarchar
set @num = 'hello'
select cast (cast(@num as varbinary)as int)
end
Abhay Chaudhary
Sr.DBA (MCITP/MCTS :SQL Server 2005/2008 ,OCP 9i)
June 25, 2009 at 10:30 pm
sudha.2k7 (6/25/2009)
HiCould you please tell me if it is possible to use a data conversion transformation from nvarchar to int??
My data needs such a transformation as my manager does not want to change either of these datatypes.
Thank you
Does the transformation need to be two way? What does the nvarchar data look like? Some sample data representative of the actual data would be of great help to give you a better answer.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply