jQuery in Action, 2nd edition*
The moose likes Oracle/OAS and the fly likes Not able to apply decode function to my query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Not able to apply decode function to my query" Watch "Not able to apply decode function to my query" New topic
Author

Not able to apply decode function to my query

Kartik Talasu
Ranch Hand

Joined: Aug 21, 2009
Posts: 98
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

Joined: Feb 06, 2008
Posts: 459
    
    1
Refer this http://www.oradev.com/decode.jsp


Vinod Tiwari | Twitter
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not able to apply decode function to my query
 
Similar Threads
// simple Question
Game Programming Problem! J2ME
How to extract columns of coordinate values from text file (in java) ?
Sequencing Records
Need help - Lot of joins are slowing down my query