Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have these two tables
Entete:
IDEntete,
Parameter;
Ligne:
IDLigne,
IDEntete,
Number;
My issue is that if Parameter = 'A' then Number must be multiplied by -1.
I guess I should do a left join with a calculated field, is this the right solution and what would the be syntax ?
i there a way to recalculate Number without a left join ?
regards
Vauban
Hi Vauban,
my proposal is to use ApplyMap.
1. Mapping table:
MapParameter:
Mapping
Load
IDEntete,
Parameter
Resident Entete;
Drop Table Entete;
2. Enter 'Parameter' in table 'Ligne':
Ligne:
Load
IDLigne,
IDEntete,
ApplyMap('MapParameter', IDEntete) as Parameter,
Number;
Now you have Parameter and Number in one table and can do your calculation.
Happy qliking
Burkhard
Fine Thank you.
What would be the syntax if I wanted to use left join and get the number * -1 ?
what do you recommend in term of performance ?
Regards
Vauban
Hi Vauban,
my proposal is to use ApplyMap.
1. Mapping table:
MapParameter:
Mapping
Load
IDEntete,
Parameter
Resident Entete;
Drop Table Entete;
2. Enter 'Parameter' in table 'Ligne':
Ligne:
Load
IDLigne,
IDEntete,
ApplyMap('MapParameter', IDEntete) as Parameter,
Number;
Now you have Parameter and Number in one table and can do your calculation.
Happy qliking
Burkhard