Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Regarding Decode

 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 2407
36
Scala Python Oracle Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
santhosh kumar vk
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks you for reply
 
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic