Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Shahzad_Ahsan
Creator III
Creator III

How to map data from two columns of a table to one

Hi Freinds

I am stuck in a problem.

I have two tables. lets say T1 and T2 like this

T1:

SubIdMainId
01
02
03
94
105
06

 

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

Labels (1)
1 Solution

Accepted Solutions
h_prakash
Creator II
Creator II

Hi,

Just a small correction

select mainID

from table2

concatenate

select Subid as mainID

from table1 where Sunid<>0

Thanks

Prakash

View solution in original post

3 Replies
Channa
Specialist III
Specialist III

select mainID from table2

concatenate

select Subid from table1 where Sunid<>0

Channa
h_prakash
Creator II
Creator II

Hi,

Just a small correction

select mainID

from table2

concatenate

select Subid as mainID

from table1 where Sunid<>0

Thanks

Prakash

Shahzad_Ahsan
Creator III
Creator III
Author

Hi @h_prakash  

Thanks for the solution