April 27, 2012 at 12:24 am
Hi,
I do not know if I understand correctly but try this:
Hope this helps.
April 27, 2012 at 12:36 am
Thank you
Vinu Vijayan
Imoveis em Guarulhos
Imoveis em Guarulhos its not working in some case..
Vinu Vijayan data type is int only.
Regards
Guru
April 27, 2012 at 12:39 am
imex (4/27/2012)
Hi,I do not know if I understand correctly but try this:
Hope this helps.
Yes. If you want "@c" to be calculated then you can use imex's method....or else if you want to stuff the 0s in between the variables you can use my method.
This is a variation of my method when you can keep the variables as "int" and later cast them as varchar:
declare @a int ,@b int,@c varchar(10), @d int = 0
set @a=1
set @b-2=2
Set @C=+Cast(@a As varchar)+Cast(@d As varchar)+Cast(@d As varchar)+Cast(@b As varchar)
Select @C
set @a=112
set @b-2=2
Set @C=+Cast(@a As varchar)+Cast(@d As varchar)+Cast(@d As varchar)+Cast(@b As varchar)
Select @C
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply