Advertisement

09.30.2008 at 10:48PM PDT, ID: 23777043 | Points: 500
[x]
Attachment Details

Need help to write a query

Asked by kirank05 in Oracle 10.x, Oracle 9.x, PL / SQL

Hi,
  Based on requirement,i have written a query and it contains huge data,but i need to do optimized.  Plus, we need to restrict the output to only 15 users for each hmz_production_id.  I actually dont know the best SQL to solve this.

Here is the sql

 select hmz_production_id,ID from users

        where (mod(floor(statval/256),2)=1

         or mod(floor(statval/128),2)=1

         or mod(floor(statval/512),2)=1

         or mod(floor(statval/2048),2)=1)

        and sub=1

        group by hmz_production_id,id;

where id having index created on table.

please can anybody help me out to sort this.

Thanks in advance
 Start Free Trial
 
Loading Advertisement...
 
[+][-]10.01.2008 at 12:18AM PDT, ID: 22612183

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.01.2008 at 12:22AM PDT, ID: 22612205

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.01.2008 at 03:44AM PDT, ID: 22612904

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.01.2008 at 04:14AM PDT, ID: 22613035

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.01.2008 at 12:28PM PDT, ID: 22618096

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.04.2008 at 02:15AM PDT, ID: 22640051

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628