declare @i int
SELECT ItemCode,Sum(Quantity*Price) jg
Into #Temp_1
From Rdr1
Group By ItemCode
select @i=1
while @i<=3
begin
Insert Into #Temp_1 Values('aaa',1)
select @i=@i+1
end
SELECT ItemCode,Sum(Quantity*Price) jg
Into #Temp_1
From Rdr1
Group By ItemCode
select @i=1
while @i<=3
begin
Insert Into #Temp_1 Values('aaa',1)
select @i=@i+1
end
Select * From #Temp_1