I am trying to obtain the longest full name with a zip+4
SELECT TOP 1 * FROM waynedb ORDER BY FULLNAME WHERE LEN(RTRIM(FULLNAME)) = (SELECT MAX(LEN(RTRIM(FULLNAME))) FROM waynedb WHERE LEN(RTRIM(FULLNAME)) > 0 AND LEN(RTRIM(ZIP4)) > 9)
I am receiving records without zip+4
SELECT TOP 1 * FROM waynedb ORDER BY FULLNAME WHERE LEN(RTRIM(FULLNAME)) = (SELECT MAX(LEN(RTRIM(FULLNAME))) FROM waynedb WHERE LEN(RTRIM(FULLNAME)) > 0 AND LEN(RTRIM(ZIP4)) > 9)
I am receiving records without zip+4