Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have this hypothetical scenario:
LOAD
a,
b,
c,
d * e / f + g - h as UglyCalculation,
x,
y,
z
from My.qvd (qvd);
I need to reuse UglyCalculation and would rather not repeat it everywhere. Is there a way to reference it by alias in further calculations in the same load? I need (for example)
UglyCalculation / x as x1,
UglyCalculation * y as y1,
z
I know that won't work, of course. Can it be managed somehow with a second LOAD statement?
Thanks.
Use preceding load
LOAD *,
UglyCalculation / x as x1,
UglyCalculation * y as y1;
LOAD
a,
b,
c,
d * e / f + g - h as UglyCalculation,
x,
y,
z
from My.qvd (qvd);
May be check this out:
https://www.quickintelligence.co.uk/variables-parameters-load-script/
Use preceding load
LOAD *,
UglyCalculation / x as x1,
UglyCalculation * y as y1;
LOAD
a,
b,
c,
d * e / f + g - h as UglyCalculation,
x,
y,
z
from My.qvd (qvd);
Thank you. More to my issue at hand, I didn't realize you could "stack" preceding loads, which is exactly what I needed here. It's best not to get carried away, of course, but it's a perfect fit here. Thanks again.