Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Sql question - please reply fast
select field1, decode(field1, 'Info missing', 'Info missing', 'Bad info', 'Bad info', substr(field1, 1, instr(translate(field1, '0123456789', '@@@@@@@@@@'), '@')-3))
from <your_table>
HTH
Iulian
-----Original Message-----
Sent: Thursday, November 15, 2001 8:56 AM
To: Multiple recipients of list ORACLE-L
Hej
Would like to have som help with this. Please give me an example of sql statement.
I have field1.
Pelle T3333
Kalle S1000
Info missing
Pelle Svensson T33333
Bad info
and want this result after the selectstatement.
Pelle
Kalle
Info missing
Pelle Svensson
Bad info
which means that I dont want to have the last word in this field except 'Info missing' and 'Bad info'. These two should remain unchanged, but all other should not have the last word .
Thanksin advance
Roland S
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: Roland.Skoldblom_at_ica.se
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: Iulian.ILIES_at_mobil-rom.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Nov 15 2001 - 06:37:14 CST
![]() |
![]() |