Skip to Main Content

SQL Developer

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!

Searching a string for characters from left to right.

Javier PJan 13 2021

Hi all,
I would like to perform a query that finds the first characters from a string.
For example:
Having Smitherson in the string that I can enter 'Sm' or 'SMITH' or 'S' and include the record.that start with those character without limit of characters entered. If I enter S include all records that start with 'S' but if I enter SM that also should include all records that start with 'SM'
Unlike instr function that include the characters found in any place of the string I would like to search only if the character are in front of the string.
I also tried the equal = sign but that find the exact match for the string.
What function can I use?
Thanks for the help!
Javier

This post has been answered by Solomon Yakobson on Jan 13 2021
Jump to Answer
Comments
Post Details
Added on Jan 13 2021
6 comments
845 views