Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table A where each record has a unique ID.
I have created a table B from table A by concatenating various conditions.
I have now realised some records appear 2 or more times in table B as they belong to 2 or more conditions. How can I filter to only show each unique ID once?
I realised i can do count (distinct unique ID) in a chart, however this adds an additional column which i dont want.
Does anyone know of a solution to this problem?
Thanks,
hii,
use "Distinct" at the time of load. then your scrip of loading table B is as follows:
B:
load distinct * from table B;
-Nilesh
hi,
table A contains distinct unique IDs.
what I am doing at the moment is:
tableB:
load
1,
2
resident tableA
where condition1;
concatenate load
1,
2
resident tableA
where condition 2;
hence your method nilesh doesnt accomplish the desired result.
thanks for your help though. hopefully my clarification helps.
hi,
table A contains distinct unique IDs.
what I am doing at the moment is:
tableB:
load
1,
2
resident tableA
where condition1;
concatenate load
1,
2
resident tableA
where condition 2;
hence your method nilesh doesnt accomplish the desired result.
thanks for your help though. hopefully my clarification helps.
if you are concatenating the two tables its difficult to have distinct values...
instead of that you can join the two tables on the field "1"....
-Nilesh
Hi ,
Try this code below
tableB:
load
1,
2
resident tableA
where condition1;
concatenate
Load *
where not Exists(1); //Field1 Name
load
1,
2
resident tableA
where condition 2;
Regards
//Yusuf