Reputation: 57
I have some fields that form an address, which for the sake of argument has 5 address lines:
line1,
line2,
line3,
line4,
line5.
All of which are their own column in the table.
Is there a way within mysql to express this as one memo field as an address label? (with linebreaks)
Upvotes: 1
Views: 55
Reputation:
how about:
concat_ws('<br>',
IF(LENGTH(`address1`),`address1`,NULL),
IF(LENGTH(`address2`),`address2`,NULL),
IF(LENGTH(`address3`),`address3`,NULL)
)
Upvotes: 1