How the address is arranged over multiple lines?

By | February 15, 2013

In Sage CRM, you can see address of Person arranged over multiple lines as shown below.

This is because the corresponding view under the Address entity is written as follows.
CREATE VIEW vAddress AS
SELECT
ISNULL(rtrim(Addr_Address1), ”) +’
‘+ ISNULL(rtrim(Addr_Address2), ”) +’
‘+ ISNULL(rtrim(Addr_Address3), ”) +’
‘+ ISNULL(rtrim(Addr_Address4), ”) +’
‘+ ISNULL(rtrim(Addr_Address5), ”) AS Addr_Street,
Address.* FROM Address WHERE Addr_Deleted IS NULL
What if you need to display address in one single line? For this you need to change the vAddress view in Address entity as follows:
CREATE VIEW vAddress AS
SELECT
ISNULL(rtrim(Addr_Address1), ”) +’ ‘+ ISNULL(rtrim(Addr_Address2), ”) +’ ‘+ ISNULL(rtrim(Addr_Address3), ”) +’ ‘+ ISNULL(rtrim(Addr_Address4), ”) +’ ‘+ ISNULL(rtrim(Addr_Address5), ”) AS Addr_Street,
Address.* FROM Address WHERE Addr_Deleted IS NULL
After changing the vAddress view you can see the address in one line. Please refer below screenshot.