Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I want to load data from excel which should be distinct based on one column. When i am trying load distinct (all column names) it is loading all data as it is. When i am using load distinct (one column) than it is loading distinct values of that column. But i want to remove all other column values based on one column as distinct. Could any one help me??
load:
a as b
from xml
where a <> ;
load:
a as c
from xml
where a = ;
no?
Hi
That depends on what you want to do with the multiple values in the other columns.
LOAD Distinct myColumn,
Concat(Column2, ',') As Column2,
Concat(Column3, ',') As Column3,
FROM ....
Group By myColumn;
LOAD Distinct myColumn,
Min(Column2) As Column2,
MaxString(Column3) As Column3,
FROM ....
Group By myColumn;
myColumn:
LOAD Distinct myColumn From ....;
ChildColumns:
LOAD * From ....;
LOAD myColumn,
Column2,
...
FROM ...
Where Not(Exists(myColumn));
Regards
Jonathan