Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to do something like this?
Function fnConvTooQQ(uniBase,cantBase){
var cantReturn;
var factConv;
if (uniBase=="LTA" || uniBase=="FGS" || uniBase=="QQ"){
cantReturn=cantBase;
}
else {
factConv = "LOAD FC as factConv FROM vConversionUM.qvd (qvd) WHERE UMO = uniBase and UMD='QQ'";
cantReturn = cantBase * factConv;
}
return cantReturn;
};
I don't think you can use a load statement in a macro. But I don't think you need to either. This might do what you want:
MapFC:
mapping LOAD uniBase, FC FROM vConversionUM.qvd (qvd) WHERE UMD='QQ';
T2:
load *,
if(match(uniBase,'LTA','FGS','QQ'), 1, applymap('MapFC',uniBase)) * cantBase as ConvertedToQQ
from ....;
Thanks This work because I just compare one field, but if I need compare 3 fields the mapping not work.
I'm new in vbscript and I need how to load a qvd in my vbscript...
Help please