Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Decode
--=-eNF2Ks91nziwG8MFruVo
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Here you go, Ruth,
select decode(field,'data value1','output1','data value2','output2',...'output if none others') MEANINGFUL_ALIAS from yadayada
Rodd
On Wed, 2002-09-11 at 14:28, Carle, William T (Bill), ALCAS wrote:
Ruth,
You can pull manuals off the web at this URL:
http://download-east.oracle.com/otndoc/oracle9i/901_doc/nav/docindex.htm
This is for 9i. If you have 8i, they have that too.
Bill Carle
AT&T
Database Administrator
816-995-3922
wcarle_at_att.com
-----Original Message----- Sent: Wednesday, September 11, 2002 1:59 PM To: Multiple recipients of list ORACLE-L Subject: Decode
Hello everyone,
I am having a senior moment and I have forgetten the syntax for 'decode'. Can anyone give me a hint. I have leant out my sql books and of course I need them now.
Thanks in advance,
Ruth Gramolini
Oracle DBA, Vermont Department of Taxes
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Ruth Gramolini
INET: rgramolini_at_tax.state.vt.us
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: Carle, William T (Bill), ALCAS
INET: wcarle_at_att.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).
--=-eNF2Ks91nziwG8MFruVo
Content-Type: text/html; charset=utf-8
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/1.0.4.99">
</HEAD>
<BODY>
Here you go, Ruth,
<BR>
<BR>
select decode(field,'data value1','output1','data value2','output2',...'output if none others') MEANINGFUL_ALIAS
<BR>
from yadayada
<BR>
<BR>
Rodd
<BR>
<BR>
On Wed, 2002-09-11 at 14:28, Carle, William T (Bill), ALCAS wrote:
<BLOCKQUOTE>
<PRE><FONT COLOR="#2524dd"><FONT SIZE="3"><I>Ruth,</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I> You can pull manuals off the web at this URL:</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>http://download-east.oracle.com/otndoc/oracle9i/901_doc/nav/docindex.htm</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I> This is for 9i. If you have 8i, they have that too.</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>Bill Carle</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>AT&T</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>Database Administrator</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>816-995-3922</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>wcarle_at_att.com</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I> -----Original Message-----</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>Sent: Wednesday, September 11, 2002 1:59 PM</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>To: Multiple recipients of list ORACLE-L</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>Subject: Decode</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>Hello everyone,</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>I am having a senior moment and I have forgetten the syntax for 'decode'.</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>Can anyone give me a hint. I have leant out my sql books and of course I</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>need them now.</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>Thanks in advance,</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>Ruth Gramolini</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>Oracle DBA, Vermont Department of Taxes</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>-- </FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>Please see the official ORACLE-L FAQ: http://www.orafaq.com</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>-- </FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>Author: Ruth Gramolini</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I> INET: rgramolini_at_tax.state.vt.us</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>San Diego, California -- Public Internet access / Mailing Lists</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>--------------------------------------------------------------------</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>To REMOVE yourself from this mailing list, send an E-Mail message</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>the message BODY, include a line containing: UNSUB ORACLE-L</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>(or the name of mailing list you want to be removed from). You may</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>also send the HELP command for other information (like subscribing).</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>-- </FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>Please see the official ORACLE-L FAQ: http://www.orafaq.com</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>-- </FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>Author: Carle, William T (Bill), ALCAS</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I> INET: wcarle_at_att.com</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>San Diego, California -- Public Internet access / Mailing Lists</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>--------------------------------------------------------------------</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>To REMOVE yourself from this mailing list, send an E-Mail message</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>the message BODY, include a line containing: UNSUB ORACLE-L</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>(or the name of mailing list you want to be removed from). You may</FONT></FONT></I>
<FONT COLOR="#2524dd"><FONT SIZE="3"><I>also send the HELP command for other information (like subscribing).</FONT></FONT></I></PRE>
Received on Wed Sep 11 2002 - 13:54:18 CDT