June 25, 2009 at 4:04 pm
In a given set of commands, take a field for example, how would you change that field that appears as number format to be change into a text format? Thanks!!!
June 25, 2009 at 4:16 pm
Have a look to BOL for CONVERT/CAST
Way too less information for any other answer.
June 25, 2009 at 9:02 pm
Hope this example helps as you have asked a general question and not given any other information :
begin
declare @num int
set @num = 22
select cast( @num as char)
end
Abhay Chaudhary
Sr.DBA (MCITP/MCTS :SQL Server 2005/2008 ,OCP 9i)
June 26, 2009 at 3:59 am
hi_abhay78 (6/25/2009)
select cast(@num as char)
Heh. Well unless you specifically need that integer as a fixed-length char(30)...
CONVERT(varchar(11), @num)
Paul
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply