Null Values Not Written to Table
My Oracle input is address information similar to:
STREET: 123 MAIN STREET
CITY: ANYTOWN
STATE: ANYSTATE
ZIP: 12345
COUNTRY: USA
STREET: null
CITY: OTHERTOWN
STATE: OTHERSTATE
ZIP: 54321
COUNTRY: CAN
STREET: null
CITY: OTHERTOWN
STATE: null
ZIP: null
COUNTRY: USA
My desired output would be as follows:
123 MAIN STREET, ANYTOWN, ANYSTATE 12345 USA
null, OTHERTOWN, OTHERSTATE, 54321 CAN
null, OTHERTOWN, null null USA
My problem occurs when ‘STREET’ (the first value) is null. In that case, my entire record gets written as null.
123 MAIN STREET, ANYTOWN, ANYSTATE 12345 USA
null
null
I have used variations of this expression, all without success.
$STREET.concat(", ", $CITY, ", " , $STATE , " “,$ZIP,” ",$COUNTRY)
$STREET==null?‘’:$STREET.concat(", ", $CITY, ", “, $STATE”, “, :$ZIP”, ", $COUNTRY)
$STREET1==null?‘’:$STREET1.concat(“, “, $CITY==null?‘-’:$CITY”).concat(”, “, $STATE==null?‘-’:$STATE”) …
Any help figuring this out is appreciated.