Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
If I have a table Test with the following:
Account | Date | Initial | Price | Sequence |
---|---|---|---|---|
001 | 05/05/2012 | X | 50 | 3 |
002 | 10/10/2012 | Y | 35 | 5 |
001 | 07/03/2013 | Z | 12 | 1 |
002 | 10/10/2012 | Y | 35 | 5 |
And then I do:
LOAD Distinct Account, Date, Initial, Price, Sequence FROM Test
Would that LOAD show me only the registries that have ALL distinct fields? (Rows: 1, 2 and 3)
Because the 4 rows are for Account 001 and 002 but row #2 is equal to row #4.
But if I do: LOAD Distinct Account it'd only show me Accounts 001 and 002?
Thank you!
Hi Mart,
If you do LOAD Distinct Account, Date, Initial, Price, Sequence FROM Test you will get three lines.
Account | Date | Initial | Price | Sequence |
---|---|---|---|---|
001 | 05/05/2012 | X | 50 | 3 |
002 | 10/10/2012 | Y | 35 | 5 |
001 | 07/03/2013 | Z | 12 | 1 |
But if you do only
LOAD Distinct Account FROM Test you will get
Account |
---|
001 |
002 |
Regards,
Sergey
Hi Mart,
If you do LOAD Distinct Account, Date, Initial, Price, Sequence FROM Test you will get three lines.
Account | Date | Initial | Price | Sequence |
---|---|---|---|---|
001 | 05/05/2012 | X | 50 | 3 |
002 | 10/10/2012 | Y | 35 | 5 |
001 | 07/03/2013 | Z | 12 | 1 |
But if you do only
LOAD Distinct Account FROM Test you will get
Account |
---|
001 |
002 |
Regards,
Sergey
Hi,
In Load statement if you use only Account field with Distinct then it load only 001 and 002 two values.
But if you use
Test:
LOAD Distinct Account, Date, Initial, Price, Sequence FROM Test;
Then it should load only two rows, but you are getting 4 rows, export this rows to excel and check whether there are any white spaces in the values of the fields.
Or you can try like this
LOAD Distinct Date FROM Test; -- If you get more than two rows then there are some spaces or special characters in your data.
LOAD Distinct Initial FROM Test; -- If you get more than two rows then there are some spaces or special characters in your data.
LOAD Distinct Price FROM Test; -- If you get more than two rows then there are some spaces or special characters in your data.
LOAD Distinct Sequence FROM Test; -- If you get more than two rows then there are some spaces or special characters in your data.
Regards,
Jagan.