Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Freinds
I am stuck in a problem.
I have two tables. lets say T1 and T2 like this
T1:
SubId | MainId |
0 | 1 |
0 | 2 |
0 | 3 |
9 | 4 |
10 | 5 |
0 | 6 |
T2:
MainId |
1 |
2 |
3 |
4 |
5 |
6 |
Result I need:
MainId |
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
I want to get all the values from "SubId" which are not 0 in the new table.
Thank You
Hi,
Just a small correction
select mainID
from table2
concatenate
select Subid as mainID
from table1 where Sunid<>0
Thanks
Prakash
select mainID from table2
concatenate
select Subid from table1 where Sunid<>0
Hi,
Just a small correction
select mainID
from table2
concatenate
select Subid as mainID
from table1 where Sunid<>0
Thanks
Prakash
Hi @h_prakash
Thanks for the solution