Ingres DB, property data as below
addr1
addr2
addr3
addr4
postcode
Some address are short and so have no values in addr3 or addr4. E.g.
addr1 : 14 Random Street
addr2 : City
addr3:
addr4:
postcode : LT1 5GH
The postcode is always populated.
How can I select the address elements in contiguous fields using SQL?
So the output I want would be as below
14 Random Street, City, LT1 5GH
Flat 5, 15 Random Street, District, London, E35 5FG
67 Whatever Crescent, Lovely Street, Eastwich, LH6 &GH