3 Replies Latest reply: Sep 13, 2012 12:02 PM by Chirag Chhatralia

# multiple IF conditions

Hi,

How would I put the following into my script please?

IF ( TransA = 'B' AND FreeField NOT IN ('B', 'Q', 'W', 'K') AND Checked = '1', -Quantity,

IF ( TransA = 'H' AND FreeField = 'P' AND Checked = '1', -Quantity, 0.0) As Delivery

Chirag

• ###### Re: multiple IF conditions

Hi

Try like this,

if(TransA = 'B' and Checked = '1' , if(not mixmatch(FreeField, 'B','Q','W','K'), -Quantity),

IF ( TransA = 'H' AND FreeField = 'P' AND Checked = '1', -Quantity, 0.0)) as Delivery

Hope it helps

• ###### Re: multiple IF conditions

something lke this:

IF ( TransA = 'B' AND match(FreeField,'B','Q','W','K')=0 AND Checked = '1', -Quantity,

IF ( TransA = 'H' AND FreeField = 'P' AND Checked = '1', -Quantity, 0.0) As Delivery

• ###### Re: multiple IF conditions

Thank for the help guys.

I found/used a very similar method making use of the NOT MATCH() function;

F ( TransA = 'B' AND NOT MATCH (FreeField, 'B', 'Q', 'W', 'K') AND Checked = '1', -Quantity,

IF ( TransA = 'H' AND FreeField = 'P' AND Checked = '1', -Quantity, 0.0) As Delivery

thanks again

C