Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a phone number which can be either 13 or 14 positions long and I need to get them into one field called callingpartynumberno. I am doing this during my SQL extract, but getting an error. I need to have the If's due to other phone numbers being 2 or 5 positions. Please help. Thanks
if (len(trim([callingPartyNumber])) = 13,
PurgeChar([callingPartyNumber], Chr(34))),
if (len(trim([callingPartyNumber])) = 14,
PurgeChar([callingPartyNumber], Chr(34))) as [callingPartyNumberNo],
Hi Thom Mumaw ,
Your Expression is correct but youe have check the arrangement of braces.. try the below one..
if (len(trim([callingPartyNumber])) = 13,
PurgeChar([callingPartyNumber], Chr(34)),
if (len(trim([callingPartyNumber])) = 14,
PurgeChar([callingPartyNumber], Chr(34)))) as [callingPartyNumberNo]
Got it to work missed place ")"
if (len(trim([callingPartyNumber])) = 13,
PurgeChar([callingPartyNumber], Chr(34)),
if (len(trim([callingPartyNumber])) = 14,
PurgeChar([callingPartyNumber], Chr(34)))) as [callingPartyNumberNo],
Hi Thom Mumaw ,
Your Expression is correct but youe have check the arrangement of braces.. try the below one..
if (len(trim([callingPartyNumber])) = 13,
PurgeChar([callingPartyNumber], Chr(34)),
if (len(trim([callingPartyNumber])) = 14,
PurgeChar([callingPartyNumber], Chr(34)))) as [callingPartyNumberNo]
Thanks Arun....must not have enough coffee yet.