oracle - How to use two LIKE conditions? -
i need find students , m in first name not have , m in last name. query reason keeps displaying last names have m's... doing wrong?
select (firstname || ' ' || lastname) "fullname" a5 lower(firstname) '%a%m%' , lower(lastname) not '%a%m%' order lastname, firstname
where
clause should be:
where (lower(firstname) '%a%m%' or lower(firstname) '%m%a%') , lower(lastname) not '%a%' , lower(lastname) not '%m%'
you including cases firstname had followed by m. similarly, excluding cases lastname had both , m, comes before m.
Comments
Post a Comment