Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a data like
ID | Name | Vendor | Sub Contractor | Role | Hours | Shift |
348765 | Sovan,Mandal | DEF | ABC | XYZ | 12.2 | NS |
348765 | Shovan,Mandal | DEF | ABC | XYZ | 12.2 | NS |
in HANA table, how can i load only one data into my QlikView QVD?
I need to load only
348765 | Shovan,Mandal | DEF | ABC | XYZ | 12.2 | NS |
Please any one help me with this,
Thanks in advance for the help.
i tried:
SQL: Select distinct(ID),
name,.....,
from table.
Unfortunately it did not work.
Hi,
I can't advise on SQL, but I can advise on Qlik and what you can do is
LOAD
ID,
FirstSortedValue(Name) as Name,
Vendor,
...
Group By
ID,
Vendor,
...
;
SQL Select * from table;
Unfortunately, there's no function such as ChooseCorrectValueFromThisPileOfRandomCrap(FieldName) so you might not get THE value, but you will only get one distinct record.
Hope this helps
Juraj
Hi,
If the rows are exactly the same, then DISTINCT should work fine. Perhaps try without the brackets around 'ID'.
Here's a tutorial:
https://www.w3resource.com/sql/select-statement/queries-with-distinct-multiple-columns.php
Thanks,
Azam
Hi Azam,
Thanks for the help,
I tried with distinct, with and without the bracket.
but it did not work.
Thank you very much
That suggests that the rows are unique then. Looking at the example you posted, I notice that the first line has 'Sovan', and the 2nd has 'Shovan' in the name field. I know that the example may not be real data, but a DISTINCT would 'fail' in that query.
Azam