I have a table with following fields and data.
id type value
1 1 1
2 2 1
3 2 2
4 2 3
After running the query I should get result in temp table like below
1,1
1,2
1,3
and if i have multiple value in type 1 then it should do the same
so if the data is
id type value
1 1 1
2 1 2
3 2 1
4 2 2
5 2 3
I should get result
1,1
1,2
1,3
2,1
2,2
2,3
Appreciate any help on this.