How to cut a string in one string. [merged] [message #396593] |
Tue, 07 April 2009 05:22  |
raghu.iv85
Messages: 13 Registered: December 2008 Location: banglore
|
Junior Member |
|
|
Hi all,
I want to cut a string in another string using sql query. Suppose I want to cut 'HIST_NM_T' string in 'SH12_MC30_CE_VS_HIST_NM_T' string.
Can you anyone tell me the query?
Thanks in advance.
Regards,
Raghu.
|
|
|
How to cut a string in one string. [message #396595 is a reply to message #396593] |
Tue, 07 April 2009 05:24   |
raghu.iv85
Messages: 13 Registered: December 2008 Location: banglore
|
Junior Member |
|
|
Hi all,
I want to cut a string in another string using sql query. Suppose I want to cut 'HIST_NM_T' string in 'SH12_MC30_CE_VS_HIST_NM_T' string.
Can you anyone tell me the query?
Thanks in advance.
Regards,
Raghu.
|
|
|
|
|
Re: How to cut a string in one string. [message #396599 is a reply to message #396593] |
Tue, 07 April 2009 05:39   |
flyboy
Messages: 1903 Registered: November 2006
|
Senior Member |
|
|
Quote: | I want to cut a string in another string using sql query. Suppose I want to cut 'HIST_NM_T' string in 'SH12_MC30_CE_VS_HIST_NM_T' string.
|
If "cut" means removal (posting required result would help to understand it), then replacing 'HIST_NM_T' with empty string may be what you want: SQL> select regexp_replace( 'SH12_MC30_CE_VS_HIST_NM_T', 'HIST_NM_T', '' )
2 from dual;
REGEXP_REPLACE('
----------------
SH12_MC30_CE_VS_
1 row selected.
SQL>
|
|
|
|
|