Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Sqlimportante

RE: Sqlimportante

From: Cale, Rick T (Richard) <RICHARD.T.CALE_at_saic.com>
Date: Wed, 14 Nov 2001 05:31:35 -0800
Message-ID: <F001.003C47FB.20011114052028@fatcity.com>

You can try something like

SELECT SUBSTR(field1,1,INSTR(field1,' ',-1)-1) FROM your_table;

This are limitations. This assumes no trailing spaces and words are separated by a single space.
If without limitations you could write pl/sql to do the same thing.

HTH
Rick

-----Original Message-----
Sent: Wednesday, November 14, 2001 7:35 AM To: Multiple recipients of list ORACLE-L

Hallo,

If I have this field1

Kenny Jenny A1000
Jenny L1000
No info
Missing Info

I would have:

Kenny Jenny
Jenny
No info
Missing Info

How do I write the select statement to solve this  I just want the last word in the field to be taken away in the result from the select statement.

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: Cale, Rick T (Richard)
  INET: RICHARD.T.CALE_at_saic.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 Wed Nov 14 2001 - 07:31:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US