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

Home -> Community -> Usenet -> c.d.o.server -> Re: opposite of oracle decode

Re: opposite of oracle decode

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 06 Oct 2005 06:52:02 -0700
Message-ID: <1128606719.217610@yasure>


Adam Sandler wrote:

>>>Is there an encode function?  Searching on that didn't help... is there
>>>something the opposite of "decode"?
>>>
>>>P.S.  This isn't my DB desgin.  It is what I was given to work with.
>>>
>>>Thanks!
>>
>>er, DECODE?

>
>
> Decode lets one write to the DB? I've never seen an example of decode
> used without a select in front. That would imply querying right? My
> question wasn't about retrieving data but writing new records. I'd
> like to know if there is a oracle function that is the opposite of
> decode. I was hoping to avoid doing any mapping, when doing inserts,
> programtically.

You have been given the correct answer. You use DECODE in both directions. How much clearer could it be?

There is no way to avoid doing mapping during inserts unless you wish to write fragile code that will self-destruct the first time a table is modified.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Thu Oct 06 2005 - 08:52:02 CDT

Original text of this message

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