Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
brunopaulo
Partner - Creator II
Partner - Creator II

Load Distinct

Hi community,

I want Load 4 fields from a resident table. In this table i have ID_Employee, Name Employee, Function, UnityBussiness.

I want load this where ID_Employee must be distinct. Any ideas?

Thanks in advance
Best Regards

Bruno Paulo

15 Replies
vishsaggi
Champion III
Champion III

May be another way ?

Tab:

LOAD *, IF(ID = Previous(ID), 0, 1) AS RowNum INLINE [

ID,          Name,               Function,          Unity

1,               Bruno,               cooker,          kitchen

1,               Bruno,               cooker,          kitchen

2,               Andrew,         engineer,       company

2,           andrew,               engineer,          company

];

NoConcatenate

Final:

LOAD *

Resident Tab

Where RowNum = 1;

Drop Table Tab;

Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

Source_Temp:

Load * Inline [

ID, Name, Function,Unity

1, Bruno,cooker,kitchen

1, Bruno,cooker,kitchen

2, Andrew,engineer,company

2, andrew,engineer,company

];

NoConcatenate

LOAD

  *,

  ID as ID2

Resident Source_Temp

Where not Exists(ID2, ID)

;

DROP Table Source_Temp;

Help users find answers! Don't forget to mark a solution that worked for you!
brunopaulo
Partner - Creator II
Partner - Creator II
Author

Sorry, is hard for me create examples, but i solved the problem. Thank you

brunopaulo
Partner - Creator II
Partner - Creator II
Author

Yes dat was my error Andrew should be equal. But i solved the problem Thank you

balar025
Creator III
Creator III

I think this should work

Source_Temp:

Load *

where not exists(ID);

Load * Inline [

ID, Name, Function,Unity

1, Bruno,cooker,kitchen

1, Bruno,cooker,kitchen

2, Andrew,engineer,company

2, andrew,engineer,company

];

davidhechler
Partner - Contributor II
Partner - Contributor II

I know this has been resolved already, but couldn't you just use "Load Distinct"? It would be simpler, in my opinion.

E. g.:

 

Source_Temp:
Load Distinct * Inline [
ID, Name, Function,Unity
1, Bruno,cooker,kitchen
1, Bruno,cooker,kitchen
2, Andrew,engineer,company
2, Andrew,engineer,company
];

Exit Script;

 

 

This also results in the follwing table:

davidhechler_0-1699881382862.png