Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
Just a quick question. I wish to load only distinct records so I therefore thought (after looking at the manual) that putting eg
LOAD
DISTINCT(field),
field2....etc
from......
would work? This is not the case. Anyone wish to shed some light?
Thanks for the help!
LOAD distinct
field,
field2,
...
From...;
I thought it was too easy to be true 🙂
Thanks for help...
bc
Actually sorry,
That didn't seem to work.
I have a table with ProblemID and a list of other fields. There are Problem Id's with the same Id. The only way in that they differ is the end date. I am only looking to display the ProblemId with the most recent end date. Is this possible?
Regards,
bc
ya try peek(endday) or Previous(endday) must solve your problem according to your use.
Try
LOAD
ProblemID,
MAX(EndDate)
From.......
GROUP BY ProblemID;
Regards,
Joao
Add a Right Join too,
Right Join ( OriginalTable)
Load ProblemID,Max(EndDate) as EndDate
Resident OriginalTable
Group By ProblemID;
This should exclude all the other records, and will keep only one record per problemID