Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, Is there a way to show distinct values of 3 different columns from 3 tables into 1 column? For example:
Table 1:
Name ID
A 1
Table 2:
Name ID
A 3
Table 3:
Name ID
A 5
I want to show it in a table where it shows the distinct values of all IDs from all tables
ID
1
3
5
@GHasan can you elaborate
the example you posted here
3 table with same column name
so automatically the three tables are concatenated
so one table with the expected output
Hi Taoufiq,
Something like this:
Table 1:
Name Group X
A 1
B 2
Table 2:
Name Group Y
A 3
C 2
Table 3:
Name Group Z
B 4
I want a distinct list of groups that the names belong to (1,2,3,4)
So the final list will show:
Group All
1
2
3
4
I hope that helps. Please let me know if you have any questions.
@GHasan Please use the below script:
NoConcatenate
Temp:
Load * Inline [
Name,ID
A,1];
Concatenate(Temp)
Temp1:
Load Name,
ID
Inline [
Name,ID
A,1
A,3
]
where not Exists(ID,ID);
Concatenate(Temp)
Temp2:
Load * Inline [
Name,ID
A,1
A,3
A,5
]
where not Exists(ID,ID);
Exit Script;
Hope it resolves your issue, if yes please like and accept it as a solution.
Hi.
Try next
Table_1:
Load
Name ,
Group X as Group
from(resident) source
Table_2:
concatenate (Table_1)
Name ,
Group Y as Group
from(resident) source
Table_3:
concatenate (Table_1)
Name,
Group Z as Group
from(resident) source
Load distinct Group as [Group All]
resident Table_1;