Is there a better way to make the selection on this slider?

Is there a better way to make the selection on this slider?
I need to retrieve the test scores max (tesc_code SO1, S02, S03 etc... etc...)
I get the results presented here, but I wonder if it's a better way to do this.
The results should be back in the same cursor... e
CURSOR c_sortest_SAT_scores(p_pidm IN saturn.sortest.sortest_pidm%TYPE,
p_term in saradap.saradap_term_code_entry%TYPE)
IS
SELECT   s01.sortest_pidm       pidm_s01,
         s01.sortest_tesc_code  tesc_code_s01,
         s01.sortest_test_score score_s01,
         s02.sortest_pidm       pidm_s02,
         s02.sortest_tesc_code  tesc_code_s02,
         s02.sortest_test_score score_s02,
         s07.sortest_pidm       pidm_s07,
         s07.sortest_tesc_code  tesc_code_s07,
         s07.sortest_test_score score_s07,
         s08.sortest_pidm        pidm_s08,
         s08.sortest_tesc_code   tesc_code_s08,
         s08.sortest_test_score score_s08,
         s09.sortest_pidm        pidm_s09,
         s09.sortest_tesc_code   tesc_code_s09,
         s09.sortest_test_score  score_s09
  FROM   saturn.sortest s01,
         saturn.sortest s02,
         saturn.sortest s07,
         saturn.sortest s08,
         saturn.sortest s09
 WHERE       s01.sortest_tesc_code IN ('S01')
         AND s01.sortest_pidm = p_pidm
         AND s01.sortest_term_code_entry = p_term
         AND s01.sortest_test_score =
               (SELECT   MAX (s01a.sortest_test_score)
                  FROM   saturn.sortest s01a
                 WHERE   S01.sortest_pidm = s01a.sortest_pidm
                         AND S01A.sortest_tesc_code IN ('S01'))
         AND s02.sortest_tesc_code IN ('S02')
         AND s02.sortest_pidm = p_pidm
         AND s02.sortest_term_code_entry = p_term
         AND s02.sortest_test_score =
               (SELECT   MAX (S02A.sortest_test_score)
                  FROM   saturn.sortest s02a
                 WHERE   S02.sortest_pidm = s02a.sortest_pidm
                         AND S02A.sortest_tesc_code IN ('S02'))
         AND s07.sortest_tesc_code IN ('S07')
         AND s07.sortest_pidm = p_pidm 
         AND s07.sortest_term_code_entry = p_term
         AND s07.sortest_test_score =
               (SELECT   MAX (S07A.sortest_test_score)
                  FROM   saturn.sortest S07A
                 WHERE   S07.sortest_pidm = S07A.sortest_pidm
                         AND S07A.sortest_tesc_code IN ('S07'))
         AND S08.sortest_tesc_code IN ('S08')
         AND S08.sortest_pidm = p_pidm 
         AND S08.sortest_term_code_entry = p_term
         AND S08.sortest_test_score =
               (SELECT   MAX (S08A.sortest_test_score)
                  FROM   saturn.sortest S08A
                 WHERE   S08.sortest_pidm = S08A.sortest_pidm
                         AND S08A.sortest_tesc_code IN ('S08'))
                 AND S09.sortest_tesc_code IN ('S09')
         AND S09.sortest_pidm = p_pidm 
         AND S09.sortest_term_code_entry = p_term
         AND S09.sortest_test_score =
               (SELECT   MAX (S09A.sortest_test_score)
                  FROM   saturn.sortest S09A
                 WHERE   S09.sortest_pidm = S09A.sortest_pidm
                         AND S09A.sortest_tesc_code IN ('S09'));

Hello

The problem is that you to act as a Cartesian product with all the tables (you will get: S01 * S02 * S08 * S09 lines!) Is it really what you want?
I don't think...

Wharton, you can do (with no Cartesian product) is:

CURSOR c_sortest_SAT_scores(p_pidm IN saturn.sortest.sortest_pidm%TYPE,
p_term in saradap.saradap_term_code_entry%TYPE)
IS
SELECT sortest_pidm pidm, sortest_tesc_code tesc_code,
       sortest_test_score score
  FROM sortest
 WHERE (sortest_tesc_code, sortest_test_score) IN (
          SELECT   sortest_tesc_code, MAX (sortest_test_score)
              FROM sortest
             WHERE sortest_tesc_code IN ('S01', 'S02', 'S07', 'S08', 'S09')
               AND sortest_pidm = :p_pidm
               AND sortest_term_code_entry = :p_term
          GROUP BY sortest_tesc_code)
   AND sortest_pidm = :p_pidm
   AND sortest_term_code_entry = :p_term

However you absolutely need a Cartesian product, you can do:

WITH allrows AS
     (SELECT sortest_pidm pidm, sortest_tesc_code tesc_code,
             sortest_test_score score
        FROM sortest
       WHERE (sortest_tesc_code, sortest_test_score) IN (
                SELECT   sortest_tesc_code, MAX (sortest_test_score)
                    FROM sortest
                   WHERE sortest_tesc_code IN
                                          ('S01', 'S02', 'S07', 'S08', 'S09')
                     AND sortest_pidm = :p_pidm
                     AND sortest_term_code_entry = :p_term
                GROUP BY sortest_tesc_code)
         AND sortest_pidm = :p_pidm
         AND sortest_term_code_entry = :p_term)
SELECT s01.pidm pidm_s01, s01.tesc_code tesc_code_s01, s01.score score_s01,
       s02.pidm pidm_s02, s02.tesc_code tesc_code_s02, s02.score score_s02,
       s07.pidm pidm_s07, s07.tesc_code tesc_code_s07, s07.score score_s07,
       s08.pidm pidm_s08, s08.tesc_code tesc_code_s08, s08.score score_s08,
       s09.pidm pidm_s09, s09.tesc_code tesc_code_s09, s09.score score_s09
  FROM allrows s01, allrows s02, allrows s07, allrows s08, allrows s09
 WHERE s01.tesc_code = 'S01'
   AND s02.tesc_code = 'S02'
   AND s07.tesc_code = 'S07'
   AND s08.tesc_code = 'S08'
   AND s09.tesc_code = 'S09'

The lines will be stored in memory to a temporary table before that product happen (should be faster)...

Tags: Database

Similar Questions

  • Now that we have liquid, is there a better way to make an Alphabet for Webapp elements filter when you have more than 500 Articles?

    Now that we have liquid, is there a better way to make an Alphabet for Webapp elements filter when you have more than 500 Articles?

    I am using the JQuery ListNav, but my webapp now has too many items.  Liquid filter by chain to make a filter of the alphabet?

    {module_webapps id = "16734" filter = 'all' template="/Layouts/WebApps/Applications/dashboard-list-a.tpl' = 'collection' render}

    What else can I use in the parameter 'filter '?

    Thank you!

    Shannon

    Udemy as a tutorial on it. Practical examples of liquid for Adobe Business Catalyst markup . It was called list Rolodex. This is the solution you want.

  • Is there a better way to remove the toolbar "Frequently used tools" (which I've never used!) to open whenever I open Acrobat reader. rather than uninstall Acrobat and use another PDF reader?

    Is there a better way to eliminate the "frequently used tools.
    toolbar (which I've never used!) to open whenever I open Acrobat
    drive. rather than uninstall Acrobat and use another PDF reader?

    Hi jg49392310,

    You can disable the tool pane with Adobe Acrobat Reader DC was last updated, see this note cover hide the tools Panel in Acrobat and Acrobat Reader DC at all times.

    Kind regards

    Nicos

  • Is there a better way to make this pop up?

    I have a VI that has more than 900 void screw which has been developing since the Labview V5.  It has a control loop and a loop of data.   The vehicle currently has half a dozen or more Windows vi it appears for different reasons.   Most collect all of the data passed to them but don't have to return data.  I called the sub, it opens and the data is passed but he shares time with the main window, so I can not change anything in the main window as the Sub keeps seizing control.

    I came up with this solution attached below, but it seems that there must be a better way?  I don't know that I just lack.   I need to be able to start in a field of the program running on a while loop and sends the data to the it in an another while loop which collects data while giving full control to the main VI.
    Thanks for any help.


  • Is there a better way to generate the custom timed digital signals

    I'm trying to generate the digital output from the top and down with delays on different lines. Each daq assistant is activate single line on a port USB 6501. There more complex high and lows that I need to generate variable time difference between high and low. There is codebelow that does what I'm trying to achieve, but for a model executing high and low signal is much of your time to do it this way. I'm sure there is a better way to do it, I'm not an expert on labview so I only discovered its potential. Anyone can suggest a more effective and a quick way to do it. I would like to hgihly appreciate. Thank you!

    I've not shown in the code below, but using the DAQ assistant, I initialized lines at low logic level.


  • is there a better way to set the value?

    It is a very simple application. Here's what I'm trying to accomplish:

    I click on the 'new order' button on page 1, and it takes me 10 page. In the meantime a new empty order is created. order_id is stored in the application element.

    Page 10, I click on 'choose the customer', and takes me to page 11, where I have a list of customers (a report), and by opting for a client (link column), p10_customer_id is defined, and the application navigates back to page 10.

    On page 10, there is a process of page that fires whenever the page is displayed (if order_id is not null), and update the orders table by setting the value of the item p10_customer_id the customer_id.

    What I want is simple: create a command, set the customer_id (and possibly settle the customer_id again if the user wants to change).

    It works now, but I don't like that the customer_id is updated each time this page is rendered. Simply put the customer_id of page 11 only, when the user selects a customer in the list.

    But I have not found a way to do it.

    Also, it would be good to create all of the order, the customer id, order items all in one transaction and post them right at the end, but I did see a way to not make any changes on a page when I navigate to another page. Because now, if something unexpected occurs, for example the user does not complete the order (navigates away, or closes the browser), the orders table will be almost completely empty, unused lines

    I use Oracle10g XE and Apex 3.1.2

    Thank you
    Gabor

    Hi Gee2,

    Have you checked how the collections of the apex? In my opinion, you can create an application of the cleaning by using this technique.
    There is a demand to make orders, created by default when you install APEX. Check the app.

    I hope this helps.
    Kind regards

    --
    Paulo Vale
    http://Apex-notes.blogspot.com

  • Is there a better way to make?  (Do not ask about codecs)

    I use CS6.  I noticed you can import AE PrPro files and vice versa, and you can also render with Media Encoder.  One of these better to render some than the other?  For example, if you use an AE animation in PrPro is it better to make the animation, and then import the video file to PrPro or to simply import the project AE go to PrPro and make all at once?  Or is it better to make everything with Media Encoder?  Or is it all just based applications?

    Adobe Media Encoder (SOUL) is ideal for creating files for final delivery. Make or export directly from After Effects are better for the creation of 'utility' exports, such as sequences of OpenEXR images for use as intermediaries in a multi-application workflows. Adobe Media Encoder is better exporting to final delivery (MPEG-2, H.264, etc), and it also has a much better user interface for navigation, creating and applying presets encoding. After effects script capabilities, can use multiprocessing for the rendering phase and can use the GPU to speed up rendering 3D drawn with RADIUS.

    My standard workflow for final rendering and export that takes advantage of the benefits of the two applications is to make a file encoded without loss of control of After Effects and have entering a watch folder for SOUL pick up and encode into different formats of delivery. Who uses AFter Effects to its faster rendering and the SOUL for its faster encoding.

  • The only region to read - is there a better way to view the data?

    Hi, I have few parts on my page at some point, the data is displayed in read mode. When elements are modifiable, form looks ok, but when you view it in read mode, there are no boxes more and seems very messy (difficult to read). Does anyone know how to organize data on the page?


    Thanks in advance

    Robert

    Robert:

    Setting of the text to be "readOnly" box should keep the scroll bar activated.

    $x('P11_textarea').readOnly = true;

    CITY

  • need a better way to reset the selected cells in a table

    Hi all

    I've been watching the various threads of discussion reset only certain fields in a form and leaving the others unchanged.

    The form, I am currently a table of 20 lines of body with 8 columns. I want to have a reset button that resets the 6 cells in each row.

    I use the following code snippet:

    for (var equal nrow = 1; nrow equal < 21; nrow equal ++)

    for (nCell var = 0; nCell < 6; i ++)

    {

    xfa.host.resetData ("form1.page1.wrapper.ICC.Table1.Row [" + equal nrow + "] .rate [" + nCell + "]");

    }

    It works but it is extremely slow (order of 10 seconds) and my pc is not outdone.  There must be a simpler (and faster!) way to do it.

    I saw a thread where cells that were to be spared from reset could be entered but could not do this work to all the. I thought to put the cells to be spared in a subform, but that went nowhere, because I was able to place cells individual separate subforms.

    Any suggestions will be welcomed with formcalc script if possible :)

    Thank you.

    Harry Ohm.

    Edit: now, it seems that this does not work as I first thought. It works on a single line, but not when the nested for loops are used.

    Post edited by: HarryOhm

    Hi Harry,.

    Just two quick questions. I would wrap the first for loop {} and then you have i ++ in the second loop:

    for (var nRow = 1; nRow < 21; nRow++)
    {
         for (var nCell = 0; nCell < 6; nCell++)
         {
              xfa.host.resetData("form1.page1.wrapper.ICC.Table1.Row[" + nRow + "].rate[" + nCell + "]");
         }
    }
    

    It seems that your table is static (lines do not repeat). One option would be to build a variable/string with object names and reset that. It is an example of a reboot of one of our forms (http://assure.ly/gBJYj9). Here it is set to zero, a line and two fields outside the table:

    // reset page 6 only
    var f1 = Table1.Row1.description.somExpression + ", ";
    var f2 = f1 + Table1.Row1.quantity.somExpression + ", ";
    var f3 = f2 + Table1.Row1.unitPrice.somExpression + ", ";
    var f4 = f3 + positionedSF.myName.somExpression + ", ";
    var f5 = f4 + positionedSF.myAddress.somExpression;
    
    xfa.host.resetData(f5);
    

    Hope that helps,

    Niall

    Ensure the dynamics

  • Is there a way to make the shortcuts for Internet Protocol Version 4?

    Hello

    I have the Internet Protocol V4 settings:

    IP address: 192.168.0.101

    Subnet mask: 255.255.255.0

    Default gateway: 192.168.0.1

    Preferred DNS server: 192.168.0.1

    I want to know if there is some way to make the shortcut for these settings so I can click on this shortcut when I want to configure the Internet Protocol V4?

    Thank you

    Rami,

    Yes, you can do what you want.  See this forum is different for different networks available static IP thread and the thread of TechNet that it links to is it possible to assign a static for each TechNet netowrk IP address

    Once you configure the properties they should stay that way so please can you explain why you want to be able to keep these values reset?

    Denis

  • Is it possible to resize previews of stamp smaller on the stamps palette, so that I can see all the stamps at once without scrolling? I know that I can increase the size of the stamps palette window, but I wanted to see if there was a way to lessen the th

    Stamps Palette.png

    It seems that the stamps in the stamps Palette have a vertical height preset in the Panel. There is no way to make the thumbnails smaller. I'm sorry.

  • Is there a way to make the character will blink or squint with one eye?

    Hi all!

    Is there a way to make the character will blink or squint with one eye? For example, in the 'Customize-> head' - Section only, I can customize some points on both eyes at the same time, but I have not found a way to make the character 'close' one eye so that it looks as if it is kind of flashing. It is even possible to do it with fuse... or IM just in the wrong place?

    Thanks in advance!

    Fabian Hey!  Fuse face expressions are more than one aspect of this face when you ask 'preview' it have rather intended for the laying of the real face.  We generally recommend leaving the fuse facial expressions and make laying in Photoshop, once you get there!  Here is a screenshot showing where you can access controls of the face in Photoshop.  That being said - I didn't "think that we have a unilateral wink or blink in fuse or Photoshop at the moment.  Might be interesting to post an idea in the forum of ideas for "better facial posing?"

    1. Select the 3D layer in the layers panel
    2. Select the skeleton of the character in the 3D Panel
    3. In the properties of the Panel change to the tab 'face '.
    4. Select an expression of search results
    5. Adjust the expression using the sliders and the offsets

  • Is there a way to make the safari opens a new page every time?

    Hello

    I'm kinda new here and I would like to ask a question. I now use an iPhone as a primary device, instead of Android. But is there a way to make the safari to remove all tabs when you close, and when you open it, it just opened a new page or a blank page? My phone is just laying around sometimes and I let my friends to use. But when I close safari after I order something or when I'm checking my bank account, they can all see when they open up safari...

    All I can think is to close all tabs before close Safari, or use it in private Mode:

    Enable or disable the navigation on your iPhone, iPad or iPod touch - Apple Support

  • is there a better way to remove exact duplicates in my iTunes library, clicking on maintain organized the iTunes media folder is not working is not on for me

    is there a better way to remove exact duplicates in my iTunes library, clicking on maintain organized the iTunes media folder is not working is not on for me

    Do not automatically methods automated in the treatment of duplicates. There are several types of duplicates and how they should be solved is different.

    How to find and delete items duplicated in your iTunes library - http://support.apple.com/kb/HT2905

    More posts by turingtest2 on different types of duplicates and techniques - https://discussions.apple.com/thread/3555601 and https://discussions.apple.com/message/16042406#16042406 (Note: DeDuper script is for Windows).

    http://dougscripts.com/iTunes/scripts/SS.php?SP=scanfordoubleentries

    http://dougscripts.com/iTunes/iTInfo/Dupin.php (commercial) There are other similar tools, including a version much sooner this package called "duplicates iTunes Corral", which I'm sure that would reveal a general web search.

    For example, Corral iTunes duplicates a mod. Eric Pugh - http://opensourceconnections.com/blog/2006/11/11/better-itunes-song-deduping/

    May 2014 post on iCloud duplicates - https://discussions.apple.com/message/25867873#25867873

    See the exact replica (Mac and Windows) - https://discussions.apple.com/message/16951281#16951281

  • Is there a way to make the LPT1 port EPP in Windows?

    Original title: is there a way to make the LPT1 port EPP in Windows?

    I have some parallel setting in BIOS for EPP is selected. Device Manager he calls an ECP port. The device requires PPE runs correctly. Is there a way to make the LPT1 port EPP in Windows?

    Hi RonaldEchols,

    ·         What is the model number of the device (printer)?

    ·         You use what version of BIOS (Basic Input Output System) and the motherboard?

    Please provide us with more information about the issue so that we can provide you with the necessary assistance.

Maybe you are looking for