How can i get this result with changing query below.
foo
01
02
03
declare @a as int
set @a = 1
select single.* from
(select
case
when 0=0 then '0'+
case
when @a = 1 then '1'
when @a = 2 then '2'
when @a = 3 then '3'
end
end
as foo) single
cross join
(select 1 as bir union all select 2 union all select 3) multi
As you have seen, i need to write first '1' then a = a + 1 in loop (in every "when" statement)
PS: I have a big query and i need to write every row three times but with some changes.(I need to change last 2 rows from "A0" to "**" under the output -Last column-)
TR13 BA20 1143 2009-08-31 2009-08-31 ***615134 TR74063001 40 1937,52 A0
TR13 BA20 1143 2009-08-31 2009-08-31 ***615134 TR74063001 50 1937,52 **
TR13 BA20 1143 2009-08-31 2009-08-31 ***615134 TR74063001 50 1937,52 **