• 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
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Not able to apply decode function to my query

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Below is the query am using, how to apply Decode for the fields for
first_entry, second_entry.

I need selected fields prog_id,prd_no,first_entry, second_entry for prog_id='1' and prd_no='1' , if there is no values for this then I need to keep ZERO for first_entry and second_entry.

The same logic again for prog_id='1' and prd_no='2'
prog_id='1' and prd_no='3'
prog_id='1' and prd_no='4'
..
.
.
.
.
prog_id='1' and prd_no='12'

Then prog_id ='2' and prd_no='1'
prog_id ='2' and prd_no='2'
.
.
.
prog_id ='2' and prd_no='12'

like this i need to check upto prog_id='8'

So totally i need to get 96 records




 
Ranch Hand
Posts: 466
1
IntelliJ IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Refer this http://www.oradev.com/decode.jsp
 
reply
    Bookmark Topic Watch Topic
  • New Topic