Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, i am trying to do something in my script but i'm not sure how to do it..
I am loading in a table with the following fields..
PosTransactionDetail:
LOAD
StoreNumber,
TransId,
EANCode AS EAN,
VATIndicator,
VATAmountDue,
VATBase,
LineType,
SaleStartDate
FROM...
But i don't want to load in any LineTypes which equal 'V' and any VATBase values less than '0'.
Can anyone help me to achieve this please?
Hi, Try this.
PosTransactionDetail:
LOAD
StoreNumber,
TransId,
EANCode AS EAN,
VATIndicator,
VATAmountDue,
VATBase,
LineType,
SaleStartDate
FROM xyz
Where (not wildmatch(LineType,'v') or VATBASE >= 0);
Regards,
Kaushik Solanki
Hi Kaushik Solanki,
Thanks for your reply.. i think i have my original question wrong though. It seems that i do actually need some of the line type'v' included...
What i need is to exclude linetype 'v' if they are greater than 0
PosTransactionDetail:
LOAD
StoreNumber,
TransId,
EANCode AS EAN,
VATIndicator,
VATAmountDue,
VATBase,
LineType,
SaleStartDate
FROM xyz
Where not wildmatch(LineType,'v') and <0 if that makes sense? So only include linetype v if a negative figure...
How can i write that?
Can anyone help me on this please?
Try solotuion proposed above. Change only operator to AND instead of OR. It'll exclude all records type V with value greater than 0.
Hi, thanks for your reply.
That doesn't work..
What that is doing is excluding ALL lineTypes of V and all negative VATBase values.
I want it to ONLY exclude positive VATBase values if they have a LineType of V...
Can this be done?
Try to change the condition to this:
FROM xyz
where not( wildmatch(LineType,'v') and VATBASE >= 0);
Regards,
erich