Re: DECODE

From: Terry Dykstra <tddykstra_at_forestoil.ca>
Date: Tue, 24 Jun 2008 17:39:11 GMT
Message-ID: <3ja8k.38$7%6.7@edtnps82>


"Mtek" <mtek_at_mtekusa.com> wrote in message news:0e367c3d-5ab5-4bff-8ed1-274ef467041b_at_m45g2000hsb.googlegroups.com...
>
> 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 
Received on Tue Jun 24 2008 - 12:39:11 CDT

Original text of this message