Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to load only the unique rows from a QVD. The first record from duplicate records should load, 2nd or any following duplicate rows should be ignored.
below is the example I am trying, please help.
QVD
| Name | ID |
| ABC | 666 |
| ABC | 444 |
| XYZ | 111 |
| KKK | 333 |
Output excepted:
| Name | ID |
| ABC | 666 |
| XYZ | 111 |
| KKK | 333 |
Regards,
J. Ravichandra Kumar
Try this:
LOAD Name,
First(ID) as ID
FirstValue(ID) as ID
FROM QVD
Group By Name;
Load Distinct?
LOAD DISTINCT
Name,
ID
FROM source;
sample:
load *
distinct
FROM ur datasource;
LOAD Name,
FirstValue(ID) as ID
FROM QVD
Group By Name;
Load
ID ,
Name
from QVD
where not exists([Name)] ;
Hahahaha thanks for pointing that out tresesco, I realized it just after posting it ![]()
Hi
Try like this
LOAD Name,
FirstValue(ID) as ID
FROM Yoursourcetable
Group By Name;