Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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