Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm hoping someone can help me out. I'm using LOAD Disctinct to get a table with just the distinct companies we have. There should only be two rows in this table, but for some reason there are over a million records. It's like the 'Distinct' keyword isn't working at all. My script is below:
Company:
LOAD
*,
1 as C.Count
;
LOAD Distinct
Company as C.Company
FROM $(vData)\Main.qvd (qvd);
Can anyone tell me why just the distinct companies aren't making it into the Company table?
Any help would be greatly appreciated!
Mphekin,
try this
Company:
LOAD Distinct
*,
1 as C.Count
;
LOAD
Company as C.Company
FROM $(vData)\Main.qvd (qvd);
Hi
Are there any other tables that have the field C.Company ?
What happens if you isolate the load distinct ?
NoConcatenate
DistinctCompany :
LOAD Distinct
Company as DistinctCompanyField
FROM $(vData)\Main.qvd (qvd);
Best Regards, Bill
Mphekin,
try this
Company:
LOAD Distinct
*,
1 as C.Count
;
LOAD
Company as C.Company
FROM $(vData)\Main.qvd (qvd);
You're right. The distinct keyword is ignored, unless it is found in the topmost Load.
HIC
Thank you all for your help!