This is what I was looking for. The concatenation function was removing the space which is vital for this statement to work.
SELECT ACCT_STRING,LASTNAME, FIRSTNAME
FROM x
where STN = '101'
AND rpad(SUBSTR(ACCT_STRING,20,6),6,' ')||rpad(SUBSTR(ACCT_STRING,16,2),4,' ')||rpad(SUBSTR(ACCT_STRING,31,4),4,' ')
NOT IN ('00000140 04 ')
My intent is not to split hairs but, instead, to clarify. First, (and this is immaterial to you objective) concatenation is not a function, it is an operation. Second, concatenationdoes not, in and of itself, cause "trimming" (or "removing the space" on either end. If there are leading or trailing spaces, concatenation does not remove them; if such spaces are disappearing, something else is causing that to happen.
Are you still suffering the symptoms, or did Carp's post resolve your need?
Mufasa
(aka Dave of Sandy, Utah, USA @ 17:00 (06Feb04) GMT, 10:00 (06Feb04) Mountain Time)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.