Main table
inst flag
1 y
2 y
3 y
4 n
5 n
6 y
10 n
11 n
12 n
20 y
21 y
ouput should be contain 2tables which r print &wastage table(use cursor)
print table
from to
1 3
6 6
20 21
wastage table
from to
4 5
10 12
inst flag
1 y
2 y
3 y
4 n
5 n
6 y
10 n
11 n
12 n
20 y
21 y
ouput should be contain 2tables which r print &wastage table(use cursor)
print table
from to
1 3
6 6
20 21
wastage table
from to
4 5
10 12
Comment