Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm struggling to solve the following.
Every organisation has an adress type A and some also have an adress type B or ....
I would like to load the adress of all organisations with adress type B and A otherwise.
So I've got the following:
Organisation | Adress type | Adress |
1 | A | V |
1 | C | W |
1 | B | X |
2 | A | Y |
2 | C | Z |
And I would like to load:
Organisation | Adress type | Adress |
1 | B | X |
2 | A | Y |
I've tried it by using the Match and Minstring function but can't get it to work.
Anyone knows a solution? Would be of great help!!
Temp:
LOAD * Inline
[
Organisation, Adress type, Adress
1, A, V
1, C, W
1, B, X
2, A, Y
2, C, Z
];
NoConcatenate
Temp2:
Load Distinct Organisation, Organisation as ORGTEMP, [Adress type], Adress Resident Temp Where [Adress type] = 'B';
Concatenate
Load Distinct Organisation, [Adress type], Adress Resident Temp Where NOT Exists (ORGTEMP, Organisation) and [Adress type] = 'A';
Drop Table Temp;
Drop Field ORGTEMP;
Thanx a lot!!!
Changed a little bit in the script. Not working with inline since the file in fact consists of 160.000 lines.
However the lower part seems to function well!
I have tested with million records here and it's working fine with some different example...
It should work.. Let me know what you have changed in your script !