Skip to Content
0
Apr 27, 2014 at 11:23 AM

Concatenate few fields on a condition

50 Views

I am having the following address fields Address1; Address2; Address3; City; State; ZIP; Country. I want to concatenate all the fields for which I do as below

Address1&"; "& Address2&"; "&Address3&"; "&City&"; "&State&"; "&ZIP&"; "&Country. The issue in doing so is that in many of the cases many of the fields remain vacant so some times I get the result as

; ; XYZ Street; Jaipur; Rajasthan; ; India.

I am looking for a code where I could I avoid these semi colons when the data for the field is not present.

Hope to get a help at the earliest possible.

Regards

Sreejith J