I am currently trying to write a select statement that will return
name information. We have a situtation where we have last names with
hypens in them and when the exact name is entered "Adam-salmi" it
returns last names that are "Adam" also. I am new to Oracle and any
help would be greatly appreciated. I will attach the sql statement.


SELECT LAST_NAME,
       FIRST_NAME,
       MIDDLE_NAME,
       SUFFIX,
       TO_CHAR(BIRTH_DATE,'YYYY/MM/DD'),
       SSN_OR_EIN,
       WARRANT_DEPARTMENT,
       WARRANT_KEY,
       PERSON_SEX,
       RACE_CODE,
       LAST_NAME || FIRST_NAME
    FROM PR00100T.WARRANT A,
       PR00100T.MASTER_NAME B,
       PR00100T.PERSON C
    WHERE A.WANTED_PERSON_KEY = B.PERSON_KEY
       AND A.WANTED_PERSON_KEY = C.PERSON_KEY
       AND A.WANTED_NAME_KEY = B.NAME_KEY
       AND A.WARR_STATUS_CODE = '01'
    AND LAST_NAME || FIRST_NAME >= TRIM(:WS-BEGIN-KEY02)
    ORDER BY B.LAST_NAME ASC,
    B.FIRST_NAME ASC,
    B.MIDDLE_NAME ASC,
    A.WARRANT_KEY ASC;

-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to