I am attempting to pull contact data which includes basic client contact information. Problem: There are line breaks in the address field, and I cannot for the life of me figure out what will remove them.
I have tried variations of both the below queries and all produce the same results which are addresses that take up multiple lines when transferred to excel. I keep ending up with uneven rows of data--10 client names, but say 15 lines of addresses that don't line up with the client name.
Example 1:
SELECT clientname, contaddress, ContTownCity, ContCounty, contpostcode, Contphone, ContEmail, replace(
replace(
replace(
replace(contAddress,
Char (9),''),
Char(13),''),
char(10),'')
FROM tblengagement as E
INNER JOIN tblcontacts as C
ON e.contindex = c.ContIndex;
Example 2 query from a view of the desired fields:
select replace(
replace(
replace(
LTrim(RTrim(ContAddress)),
' ',' |'),
'| ',''),
'|','')
AS AddressSingleSpace
from salesforce1
Ideas of a better way to query this or should I take a whole different approach to gathering this?