From ineyman@perceptron.com Wed, 14 Nov 2001 05:24:46 -0800 From: "Igor Neyman" Date: Wed, 14 Nov 2001 05:24:46 -0800 Subject: Re: komplex sql Message-ID: MIME-Version: 1.0 Content-Type: text/plain > 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. > So true. I was thinking the same. Igor Neyman, OCP DBA ineyman@perceptron.com ----- Original Message ----- To: "Multiple recipients of list ORACLE-L" Sent: Wednesday, November 14, 2001 6:50 AM > 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: Roland.Skoldblom@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@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). > > > 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: lerobe@acxiom.co.uk > > 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@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: Igor Neyman INET: ineyman@perceptron.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@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).