wood burning stoves 2.0*
The moose likes Oracle/OAS and the fly likes Regarding Decode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Regarding Decode" Watch "Regarding Decode" New topic
Author

Regarding Decode

santhosh kumar vk
Ranch Hand

Joined: Aug 25, 2009
Posts: 144
Hi,

Could you please tell me how the + operator will work in oracle decode for example

WHERE pc.catg_c = DECODE(ml.catg_c (+), 'A', 'B', 'C', 'D')

please tell me what is the use of + operator in decode.

Thanks,
Santhosh Kumar VK
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1713
    
  14

Does the "(+)" appear in other parts of your WHERE clause or the tables in your FROM clause? It looks like an outer join condition to me.


No more Blub for me, thank you, Vicar.
santhosh kumar vk
Ranch Hand

Joined: Aug 25, 2009
Posts: 144
Thank you for reply

Which is in WHERE Class, Could you please tell me is there any differenct using the (+) operator in WHERE clause and FROM clause and then
How it will work in DECODE Function.
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

santhosh kumar vk wrote: Could you please tell me is there any differenct using the (+) operator in WHERE clause and FROM clause

As far as I know, the (+) cannot be used in the FROM clause.

How it will work in DECODE Function.

As Chris has already mentioned, this probably indicates an outer join. I guess that lines from the pc table will be included, even if there isn't a record in the ml table such that the DECODE expression would match pc.catg_c.

It would be much more readable when converted to ANSI join syntax, in my opinion.
santhosh kumar vk
Ranch Hand

Joined: Aug 25, 2009
Posts: 144
Thanks you for reply
 
Don't get me started about those stupid light bulbs.
 
subject: Regarding Decode