I have an expression written in Access
Mid([CBP], (InStr(5,[CBP],”~”)+1), (IIf((InStr((InStr(5,[CBP],”~”)+1),[CBP],”~”)-(InStr(5,[CBP],”~”)+1))>0,(InStr((InStr(5,[CBP],”~”)+1),[CBP],”~”)-(InStr(5,[CBP],”~”)+1)),0)))
What I need to do is translate this into SQL so I can use it in a pass-through query connecting to an Oracle database.
I have the syntax down for everything except the “IIF”. Is there an equivalent function in SQL that can be used to complete this expression?
Thanks for any help.