|
I have the following query:
select CASE when EA.Address1 <> '' and EA.Address2 <> '' and EA.Address3 <> '' then Replace(EA.Address2, ',' , ' ') + '' + Replace(EA.Address3, ',' , ' ')
else EA.Address1 end as employeeaddress
from EmployeeAdress EA
However employeeaddress should hold a maximum of 35 characters irrespective the number of characters in columns Address1, Address2, Address3.
Any advice how to do this?
Thanks
Berba
|
|
|
|
|
Try:
SELECT LEFT(CASE ... END, 35) As EmployeeAddress ...
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|