But 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 solve this: I just want the last word in the field to betaken away in the select statement. Roland Robertson Lee - lerobe <[EMAIL PROTECTED]>@fatcity.com den 2001-11-14 03:50 PST Sänd svar till [EMAIL PROTECTED] Sänt av: [EMAIL PROTECTED] Till: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> Kopia: SELECT DECODE(field1,'No Info','No Info','Missing Info','Missing Info',ltrim(su bstr(field1,1,instr(field1,' ')-1))) FROM mytable This works I have ran it myself. eg. SQL> @lee FIELD1 DECODE(FIELD1,'NOINF -------------------- -------------------- Jimmy J1000 Jimmy No Info No Info Timmy J1000 Timmy Missing Info Missing Info Roland, I don't mean to be harsh, but can I politely suggest that you get yourself either booked on or self study Oracle Basics. It seems that when someone provides you with a solution to a problem, rather than press ahead and solve the rest of it yourself you merely ask another question. For example, your previous question to this was how to get "No info" selected. Next you ask how to get "Missing Info" as well. Logic suggests that you merely repeat the solution you were given for the previous question re. "No Info". Sorry if I appear to be giving a lecture here but of late it seems that you are throwing questions to the list without taking anytime to think about them yourself. Regards Lee -----Original Message----- Sent: 14 November 2001 10:50 To: Multiple recipients of list ORACLE-L Hallo, How can I do a select statement that creates this: I have the field1 Jimmy Y1000 Timmy L33333 No Info Missing Info and I want the select to give me this: Jimmy Timmy No Info Missing Info You see It should still be 'No info' and 'Missing Info'after the select statement. How can I change this statement? SELECT ltrim(substr(mxurval_namn,instr(mxurval_namn,' '))) FROM mxurval; Thanks in advance Roland S -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please re-send this communication to the sender and delete the original message or any copy of it from your computer system. -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Robertson Lee - lerobe INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).