dbTalk Databases Forums  

DECODE

comp.databases.oracle.server comp.databases.oracle.server


Discuss DECODE in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mtek
 
Posts: n/a

Default DECODE - 06-24-2008 , 12:09 PM







Hi,

I'm looking around for an example of this. Can you update a table
with a DECODE statement which gets values from another table?

So, something like this:

UPDATE table1
SET column1 = DECODE(some value of a select statement.......

So, I want to update the column with one of two values depending on
the result of a query against another table....

Yes?

Thanks,

John

Reply With Quote
  #2  
Old   
Terry Dykstra
 
Posts: n/a

Default Re: DECODE - 06-24-2008 , 12:39 PM






"Mtek" <mtek (AT) mtekusa (DOT) com> wrote

Quote:
Hi,

I'm looking around for an example of this. Can you update a table
with a DECODE statement which gets values from another table?

So, something like this:

UPDATE table1
SET column1 = DECODE(some value of a select statement.......

So, I want to update the column with one of two values depending on
the result of a query against another table....

Yes?

Thanks,

John
UPDATE table1
SET column1 = (select DECODE(....) from ....where ..)

--
Terry Dykstra




Reply With Quote
  #3  
Old   
Terry Dykstra
 
Posts: n/a

Default Re: DECODE - 06-24-2008 , 12:39 PM



"Mtek" <mtek (AT) mtekusa (DOT) com> wrote

Quote:
Hi,

I'm looking around for an example of this. Can you update a table
with a DECODE statement which gets values from another table?

So, something like this:

UPDATE table1
SET column1 = DECODE(some value of a select statement.......

So, I want to update the column with one of two values depending on
the result of a query against another table....

Yes?

Thanks,

John
UPDATE table1
SET column1 = (select DECODE(....) from ....where ..)

--
Terry Dykstra




Reply With Quote
  #4  
Old   
Terry Dykstra
 
Posts: n/a

Default Re: DECODE - 06-24-2008 , 12:39 PM



"Mtek" <mtek (AT) mtekusa (DOT) com> wrote

Quote:
Hi,

I'm looking around for an example of this. Can you update a table
with a DECODE statement which gets values from another table?

So, something like this:

UPDATE table1
SET column1 = DECODE(some value of a select statement.......

So, I want to update the column with one of two values depending on
the result of a query against another table....

Yes?

Thanks,

John
UPDATE table1
SET column1 = (select DECODE(....) from ....where ..)

--
Terry Dykstra




Reply With Quote
  #5  
Old   
Terry Dykstra
 
Posts: n/a

Default Re: DECODE - 06-24-2008 , 12:39 PM



"Mtek" <mtek (AT) mtekusa (DOT) com> wrote

Quote:
Hi,

I'm looking around for an example of this. Can you update a table
with a DECODE statement which gets values from another table?

So, something like this:

UPDATE table1
SET column1 = DECODE(some value of a select statement.......

So, I want to update the column with one of two values depending on
the result of a query against another table....

Yes?

Thanks,

John
UPDATE table1
SET column1 = (select DECODE(....) from ....where ..)

--
Terry Dykstra




Reply With Quote
  #6  
Old   
Terry Dykstra
 
Posts: n/a

Default Re: DECODE - 06-24-2008 , 12:39 PM



"Mtek" <mtek (AT) mtekusa (DOT) com> wrote

Quote:
Hi,

I'm looking around for an example of this. Can you update a table
with a DECODE statement which gets values from another table?

So, something like this:

UPDATE table1
SET column1 = DECODE(some value of a select statement.......

So, I want to update the column with one of two values depending on
the result of a query against another table....

Yes?

Thanks,

John
UPDATE table1
SET column1 = (select DECODE(....) from ....where ..)

--
Terry Dykstra




Reply With Quote
  #7  
Old   
Terry Dykstra
 
Posts: n/a

Default Re: DECODE - 06-24-2008 , 12:39 PM



"Mtek" <mtek (AT) mtekusa (DOT) com> wrote

Quote:
Hi,

I'm looking around for an example of this. Can you update a table
with a DECODE statement which gets values from another table?

So, something like this:

UPDATE table1
SET column1 = DECODE(some value of a select statement.......

So, I want to update the column with one of two values depending on
the result of a query against another table....

Yes?

Thanks,

John
UPDATE table1
SET column1 = (select DECODE(....) from ....where ..)

--
Terry Dykstra




Reply With Quote
  #8  
Old   
Terry Dykstra
 
Posts: n/a

Default Re: DECODE - 06-24-2008 , 12:39 PM



"Mtek" <mtek (AT) mtekusa (DOT) com> wrote

Quote:
Hi,

I'm looking around for an example of this. Can you update a table
with a DECODE statement which gets values from another table?

So, something like this:

UPDATE table1
SET column1 = DECODE(some value of a select statement.......

So, I want to update the column with one of two values depending on
the result of a query against another table....

Yes?

Thanks,

John
UPDATE table1
SET column1 = (select DECODE(....) from ....where ..)

--
Terry Dykstra




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.