• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
Bras cause cancer. And tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic