Multiple IfThenElse error

Im trying to achieve an ifthenelse, help would be much appreciated!

What I want to achieve is the following…in pseudocode, I just need the syntax correct…

ifthenelse
(Street_Trade_Netting.counterpart = ‘SS’,
Street_Trade_Netting.tradeDate || ‘SS’ ||
ML_FormatNum(
Street_Trade_Netting.tradeID,
rpad(’’,10,‘0’)),

(Street_Trade_Netting.tradeDate || ‘KC’ ||
ML_FormatNum(
Street_Trade_Netting.tradeID,
rpad(’’,10,‘0’))

EDIT:

I get the following error message when debugging:
8688 11080 VAL-030159 2016-09-29 14:09:31 Found erroneous expression <ifthenelse(Street_Trade_Netting.counterpart= ‘SS’,

If anyone could help here it would make my day!

Cheers


niksod (BOB member since 2016-02-16)

As near as I can tell you’re missing one, probably two, right parentheses at the end.


eganjp :us: (BOB member since 2007-09-12)

i think two :wink:


bogdanpopey (BOB member since 2016-10-04)