Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

alternative to like command

806115Oct 18 2010 — edited Oct 18 2010
So I have a query that get semester value from the educational institute I am working at, and they have two possible ways of identifying an enrolment belonging to that campus.

SELECT * from sysadm.enrolments
where term like '%26' or term like'%06'

the term column is of type VARCHAR2(4 BYTE). My oracle skills are limited to being an SQL developer, is there a better way to write this query. The term value is always a four digit number; 4026, 4126, 4006, 4106 etc.

Thanks for your help!

Edited by: user8848799 on 17/10/2010 22:44
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2010
Added on Oct 18 2010
9 comments
2,815 views