Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Not able to apply decode function to my query  RSS feed

 
Kartik Tal
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • 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




 
Vinod Tiwari
Ranch Hand
Posts: 466
1
IntelliJ IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Refer this http://www.oradev.com/decode.jsp
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!