Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hey am trying to wire below state in the load script
load
xyz,
From,
To
From Table_Name
where from Like ‘GB*’ or From Like ‘AB*’ And To Not like ‘GB*’ or ‘AB*’;
Does the above like correct any response is welcome
Thanks
Hi @marcus_sommer , I think @Luben is talking about import/export of goods not fields 😉 From and To should be countries or regions, and he wants to know whats is travelling from AB* or GB* to other countries or regions.
hello Marcus, my goal is to create directions for Import and export field based on the filtered fields based on
(from Like ‘GB*’ or From Like ‘AB*’) And (To Not like ‘GB*’ or or To Not like ‘AB*’);
Thank you for your assistance
Lu
thanks JG that’s is what i am trying to explain sorry for not been very clear with my explanation.
Any Input is welcome
thanks Guys
Lu
Maybe a change within the data-structure is more useful for your task, maybe something like this:
load Key, From as Value, 'Import' as Direction from Source;
load Key, To as Value, 'Export' as Direction from Source;
- Marcus
IS it possible to write an IF statement
IF(Like ‘GB*’ or From Like ‘AB*’) And (To Not like ‘GB*’ or or To Not like ‘AB*’) AS EXPORT
this is what i need help with getting wright thanks GUYS
Yes, it's quite the same like with the above mentioned flag - and instead of 0 or 1 you could return any available field or another manual value, maybe:
load *,
if(WildMatch(From, 'GB*', 'AB*') AND Left(To, 2) <> Left(From, 2), From, null()) as Export
from x;
If there are multiple conditions on multiple values and/or fields it might be useful to prepare the fields in beforehand with something like left(FIELD, 2) to simplify the check and avoiding like's or wildmatch() and to be able to put the check-values into a mapping and returning the appropriate matchings per applymap().
- Marcus
thanks Marcus..