Skip to main content
added 1 character in body
Source Link
jkavalik
  • 5.1k
  • 1
  • 13
  • 20
CONCAT(
    addtadd.street_number, ' ', tadd.street_name, ', ',
-- concat() will return null if one is null, so ifnull returns empty string in that case
    IFNULL(CONCAT(tadd.apt_number, ', '), ''),
    tadd.city, ', ', tadd.postal_code, ', ',tadd.country
) AS 'Address'
CONCAT(
    add.street_number, ' ', tadd.street_name, ', ',
-- concat() will return null if one is null, so ifnull returns empty string in that case
    IFNULL(CONCAT(tadd.apt_number, ', '), ''),
    tadd.city, ', ', tadd.postal_code, ', ',tadd.country
) AS 'Address'
CONCAT(
    tadd.street_number, ' ', tadd.street_name, ', ',
-- concat() will return null if one is null, so ifnull returns empty string in that case
    IFNULL(CONCAT(tadd.apt_number, ', '), ''),
    tadd.city, ', ', tadd.postal_code, ', ',tadd.country
) AS 'Address'
Source Link
jkavalik
  • 5.1k
  • 1
  • 13
  • 20

CONCAT(
    add.street_number, ' ', tadd.street_name, ', ',
-- concat() will return null if one is null, so ifnull returns empty string in that case
    IFNULL(CONCAT(tadd.apt_number, ', '), ''),
    tadd.city, ', ', tadd.postal_code, ', ',tadd.country
) AS 'Address'