I want to concatenate 5 address fields into 'address'. I want to add a comma between each field. I want to bypass 'prstr2' if it is nulls. Here is my statement:
select prcnm, rtrim(prstr1) + ', ' + IsNull(prstr2, '', rtrim(prstr2) + ', ') + rtrim(prcty1)
+ ', ' + rtrim(prsta1) + ' ' +...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.