question

Murali avatar image
Murali asked

Address Concatenation

Below is the data in a table empcode ename address1 address2 address3 1 aaa NULL 4309 LAKE ST. LAUS 2 BBB 111 LAKE NULL AAAA 3 CCC 222 AAAAA NULL though there is a NULL in the column it shoould not consider and should not get the space for the NULL address.
t-sql
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
SirSQL avatar image
SirSQL answered
So something like the following? SELECT isnull(address1, '') + isnull(address2, ''), isnull(address3, '') as fulladdress
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.