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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

previously word

656678Aug 25 2008 — edited Aug 26 2008
Hi,
I have a table like this;
ID (int), Field1 (varchar2)
---------
1, abc_de_XXX_fg
2, abcd_e_XXX
3, a_b_XXX_c_d
4, a_b_cde
5, XXX_a_b_c
6, abcdef_XXX_ghij_klm_n
...
I want find previously word ("_" is word seperator) before XXX.
Results by this example:
ID (int), Field1 (varchar2), RESULT
---------
1, abc_de_XXX_fg, de
2, abcd_e_XXX, e
3, a_b_XXX_c_d, b
4, a_b_cde, null
5, XXX_a_b_c, null
6, abcdef_XXX_ghij_klm_n, abcdef
Thanks.

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 23 2008
Added on Aug 25 2008
7 comments
5,315 views