Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
What I found pretty cool a couple of months ago was that if I associated tables using the 'column association' method AND the data had a one-to-many relationship I could sum values without it duplicating the figure BUT if I actually used a join, the figure would duplicate and would affect my calculation.
A few months down the line, without any changes to code and still using the column association method, the figures are now duplicating.
Any ideas as to what the problem could be.
Thank you so much for your response. I've managed to sort it out. I have included some code for people that might be interested in analysing the differences between column associations and joins.
1. Add this code to the editor 2.Then sum on Premium ... Total premium is 400 for 2 policies
3. Now edit and unrem the join 4. The total premium now is 600 for the 2 policies
[POLICY DATA]:
LOAD * INLINE [
PolicyNo, Premium
A123, 200
B456, 200
];
[POLICY ITEM DATA]:
LOAD * INLINE [
PolicyNo, ItemInsured
A123, Mazda
A123, Toyota
B456, BMW
];
// LEFT JOIN ([POLICY DATA]) LOAD DISTINCT * RESIDENT [POLICY ITEM DATA];
Can you put an example?
Tanks.
Thank you so much for your response. I've managed to sort it out. I have included some code for people that might be interested in analysing the differences between column associations and joins.
1. Add this code to the editor 2.Then sum on Premium ... Total premium is 400 for 2 policies
3. Now edit and unrem the join 4. The total premium now is 600 for the 2 policies
[POLICY DATA]:
LOAD * INLINE [
PolicyNo, Premium
A123, 200
B456, 200
];
[POLICY ITEM DATA]:
LOAD * INLINE [
PolicyNo, ItemInsured
A123, Mazda
A123, Toyota
B456, BMW
];
// LEFT JOIN ([POLICY DATA]) LOAD DISTINCT * RESIDENT [POLICY ITEM DATA];
Thank you so much for your response. I've managed to sort it out. I have included some code for people that might be interested in analysing the differences between column associations and joins.
1. Add this code to the editor 2.Then sum on Premium ... Total premium is 400 for 2 policies
3. Now edit and unrem the join 4. The total premium now is 600 for the 2 policies
[POLICY DATA]:
LOAD * INLINE [
PolicyNo, Premium
A123, 200
B456, 200
];
[POLICY ITEM DATA]:
LOAD * INLINE [
PolicyNo, ItemInsured
A123, Mazda
A123, Toyota
B456, BMW
];
// LEFT JOIN ([POLICY DATA]) LOAD DISTINCT * RESIDENT [POLICY ITEM DATA];