• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic