1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
set dateformat dmy
declare @d_roll_old int, @i_bill_new int, @d_roll_new int, @n_pack_old int, @n_pack_new int;
declare @n_roll_old int, @n_roll_new int;
declare @i_bill int;
set @i_bill = 15;
set @i_bill_new = 15;
set @n_roll_old = 37
set @n_roll_new = 66
set @n_pack_old = 7
set @n_pack_new = 1
select * From #table