Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I am currently updating an existing application adding a couple of fields by doing a mapping in the script.
I have to test the values of some fields to apply the values for the new calculated fields but not all of my conditions seems to work.
The script is :
NoConcatenate NewTable:
Load
*,
if(Field1 = 'Value1' and Field2 = 'Value2' , 'Value3', if(Field2 = 'Value4' , 'Value5', 'Blank')) as NewCalculatedField
Resident ExistingTable
Where WildMatch(Field3, 'Value6', 'Value7' ...)
I already tried the WildMatch/Match/Trim in the conditional statement and the condition on the Field2 doesn't seem to work even if I swap the order.
Could someone help please? Many thanks for your help.
Regards,
What actual values of Field1/Field2/Field3 are in your source data? What's the expected and actual outcome?
Dear Or, please find below the answer to your question.
NoConcatenate NewTable:
Load
*,
if(Step= 'S0008' and ValueType= 'VolumeDelivered', 'S-0001', if(ValueType= 'VolumeOrdered' , 'S-0002', 'Blank')) as NewCalculatedField
Resident ExistingTable
Where WildMatch(Market, 'FR', 'BE' ...);
You need your wildcards in your wildsearch, however you want to search.
Where WildMatch(Market, 'FR*', '*BE*' ...);