Link to home
Start Free TrialLog in
Avatar of GRChandrashekar
GRChandrashekarFlag for India

asked on

concatenate

    MEMBERADDRESS.PHONENUMBER1
       || ','
       || MEMBERADDRESS.PHONENUMBER2
       || ','
       || MEMBERADDRESS.PHONENUMBER3
       || ','
       || MEMBERADDRESS.PHONENUMBER4
          AS PH,

In this, if values are null the output comes as ,,,, or in between is any is null it comes like 1,,2

any way i can sort out this problem
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Try:

MEMBERADDRESS.PHONENUMBER1
       || case when MEMBERADDRESS.PHONENUMBER1 is not null then ',' end
...
That, or just replace multiple ',,,' with one.

replace(replace(replace(new_str,',,,,',','),',,,',','), ',,','')
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial