Reg: The LIST is dynamic

Hi all

Any alternative for this query below. The list of parameters IN is dynamic and I want to merge all of this in a single statement, but the result must be controlled on the basis and only two records for each deptno deptno.

SELECT * FROM emp WHERE deptno IN (10) AND ROWNUM < = 2

UNION ALL

SELECT * FROM emp WHERE deptno IN (20) AND ROWNUM < = 2

UNION ALL

SELECT * FROM emp WHERE deptno IN (30) AND ROWNUM < = 2;

Kindly help.

Thank you

then you'd

SELECT *.

DE)

SELECT e.*, ROW_NUMBER() over (PARTITION BY e.deptno ORDER BY...): the nurse

FROM emp e

WHERE the e.deptno (...)) x

WHERE x.rn<=>

what you need to do is:

specify an order that you would see everything two records, which could vary from run to run

HTH

Tags: Database

Similar Questions

  • Select the list with the list of dynamic values with more than 4000 tank of query

    Hello

    I have no application where users can store SQL queries in a CLOB column. This query is then used to populate the list, select a dynamic element through LOV. Following the code returns the query for dynamic LOV used to populate the select list. It works fine except when the length of the lv_sqlStatement becomes more than 4000 characters. Then application crashes with "ORA-06502: PL/SQL: digital or value error: character string buffer too small" when Select the list item rendering.

    Any ideas how to get around this problem? Any help is appreciated. Do not say to them to write shorter than 4000 queries because I can't (it's operational requirements).

    DECLARE
    lv_sqlStatement end_user_set.sql_statement%type;
    BEGIN
    lv_sqlStatement: =: P2_SQL_STATEMENT;
    return ' select the label, value of (' | lv_sql_statement | t ')
    To_char (t.value) if not in (select value from end_user_set_member eusm)
    where eusm. EUSRSET_ID = ' | : P2_EUSRSET_ID | ')';
    END;

    I just blogged about this problem and posted a solution. See this announcement:

    http://www.deneskubicek.blogspot.de/2013/03/select-list-with-dynamic-lov-and-Ora.html

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • How to fill out the list of dynamic measurements

    Hello

    I create a dynamic action on a region by using a select list (item) (lov on table A).

    now the problem is that if the value in the selection list is present in the table B then must trigger the action.

    can someone tell me how to fill the column of values as the values in table B.

    I don't want to set the values manually.

    Thank you
    Little Foot

  • You can create a hidden page element that acts as an indicator of the condition "exists."
  • Create a D.A. say 'Set Hidden Page Item"that fires on the element of change o selection list, which is of type 'set Value' and uses a function body PLSQL to set the hidden page (the affected item) item, choose the item of list selection in the field 'referred to submit page '.
    Now the PLSQL block, can return 1/0 'TRUE' or 'FALSE' or 'Y' / ' not etc. Depending on whether the record exists in the other table (or whatever condition you have)

    Now when the selection list is changed, the hidden element would be set correctly by using this dynamic Action.

    So, to check if the element exists, we can use the value of the element of hidden after that page.

    You can do this either as another action True under the dynamic Action of "Set Hidden Page Item" itself (after the action SetValue True) and added a condition using the value of the hidden element
    or add another dynamic Action, fired when the hidden item is changed and when the value of the hidden element corresponds with that of your conidtion.

    Hope that I was clear enough.

  • Fetch value selection list to select the list using dynamic measurements

    Hello

    I have a select list 1 and select list 2

    as I chooses a 1 based on selected value select list option, select list 2 options screens.


    : Options P1_SELECT1

    DISPLAY RETURN VALUE OF VALUE
    D INTERIOR
    INTERNATIONAL I HAVE

    : P1_SELECT2 with dynamic statement options

    Select NAME, ID from PRODUCT_MAS
    where ADDL_FIELD1 =: P1_SELECT1

    can I do this task using dynamic measurements?
    If so how can I do this?

    You have even set a dynamic Action for this:
    Set as Select list and property 'Cascading LOV Parent article (s)' set of P2_SELECT2 to P1_SELECT1 and you're done.

  • Error in Event Viewer: loading libraries of dynamic links customized for each application. The system administrator should review the list of libraries

    My system features, i7 thinkpad w540, 16 GB of ram and a 256 GB ssd. Using MSE as av with AMBM pro

    whenever I start my system, win 7 x 64, I get the following error in the event viewer:

    Custom dynamic link libraries are loaded for each application. The system administrator should review the list of libraries to ensure that they are linked to trusted applications.

    any help with this error?

    Atul

    Description: NVIDIA shim dll initialization

    Product: Shim NVIDIA D3D drivers
    Company: NVIDIA Corporationhttp://systemexplorer.net/file-database/file/nvinit-dll/33069751

    I would not be concerned by this driver.

  • Skillbuilders Super LOV, refresh the list of SLOV values dynamically

    Hi, another question.

    I have 2 SLOVs. 1 is a relative of the 2nd.

    The first has its value dynamically for a reason any.
    I can not then dynamically change the value of the 2nd until the cascading effect is triggered by the opening of the 2nd SLOV via the button.

    If the page has LOV1 with value 'A' with LOV2 have child values "A1", "A2", "A3" available and I then proceed as follows

    $('#P1_LOV1).apex_super_lov ('setValuesByReturn', 'B'); (where B is a valid value)

    followed by
    $('#P1_LOV2').apex_super_lov ('setValuesByReturn', 'B1'); (assuming that B1, B2 and B3 are values of child for B)

    Then, it does not work.

    In fact
    $('#P1_LOV2').apex_super_lov ('setValuesByReturn', 'A1');
    $('#P1_LOV2').apex_super_lov ('setValuesByReturn', 'A2');
    $('#P1_LOV2').apex_super_lov ('setValuesByReturn', 'A3'); Still work, even if the parent is now wrong.

    So, basically, it seems that dynamically change the SLOV parent value is not triggering of the ripple effect that manually the SLOV itself chosen.

    Is it possible to force the list of values for updated after change dynamically children parent cascading?

    Concerning
    Mark

    Hi Mark,

    Some problems with the State of session here! Your lov EMP is limited to documents that match the DEPT value in session state. Initially this will be null and no value. Suppose you select a Department and send the page, so that the values are stored in session state. When you open the lov, employees would be only those for the Department which the value is stored in session state. Understand the State of Session, Oracle docs

    You were on the right track with cascading lists, but it breaks your choice by default features. So I've ignored this output, I don't want the default functionality. We need to do our own for this. Don't worry, not too!

    Off, when dept in the default settings or dept lovs changes because of a choice, the selected Department must first go to session state. This is necessary for the lov emp can find the correct records. So I added a dynamic action to fire on the change of P14_CHOOSE_DEFAULTS and P14_DEPT. The real action is a PLSQL code execution. PLSQL is always on the server side, and we can provide items to submit to the session state. The executed code is simply

    NULL;
    

    because we don't need to run anything, but P14_DEPT has the value that will be submitted to the session state when the call is made.

    With these changes, everything works. But EMP must be blanked when DEPT changes. Otherwise, you could spend DEPT autour but are not yet in a bad EMP.
    So I added another dynamic action that fires on the evolution of the DEPT and blanks in the EMP. No worries about default values, picking, because that won't change due to values only being edited
    javascript change events that are not performed.

    PS: don't forget to assign the answer useful/correct labels to messages that are :-)

  • List of dynamic members according to the level

    Hello

    Is there a way to create a list of dynamic member in HFM based on the account in the account hierarchy (I'm working on HFM v. 11.1.2.0)? I'm changing the order in which the accounts appear on our studio EN reports, where the total are displayed at the bottom of each detailed section (see example below).

    Other species
    Outstanding cheques
    (tab) Cash
    Money-markets
    Other EQ of cash.
    (tab) Cash equivalents
    (double tab) Total cash and cash equivalents


    The HFM in the order account hierarchy unlike the presentation above, simply adding members based on a flag UD translates a list in reverse order of how I want to see the report. I don't use automatic calculation in EN Studio is because I don't have only one line of data that takes in a list of member set that is based on a field UD (all members above could be labelled with UD). I couldn't realize the calculations under hierarchical with autom

    So, I wanted to make the reversal of the hierarchy in the creation of my lists of members. I thought that if I follow somehow the level of each member number, I could use to overthrow the hierarchy and possibly use it to conditionally format fields as well.

    I'd like suggestions on how to get this working or other alternatives that I can try.

    Thank you!

    Here's a possible solution I came up with my question. The following code creates a list of members that will add accounts in the correct order with parents appear at the bottom of each hierarchy. The code below is for the whole of the balance of the accounts, but it can be used on any other hierarchies as well.

    Void AccountUD2_BalSht()

    HS = ACC. Account.List ("BALANCE_SHEET", "[Descendants]")

    Set arguments array1 = CreateObject ('System.Collections.ArrayList')
    Define array2 = CreateObject ('System.Collections.ArrayList')
         
    ' Assignment of list in a table

    For each a1 within ACC
    HS = UD2Var. Account.UD2 (a1)
    If UD2Var = "TB_Acct".
    Array1.Add a1
    End if
    Next
    y = Array1.Count - 1

    "All members who are declared trial balance lines in the list of members in the correct order of entry
    Do
    TargetAcct = Array1 (i)
    For j = i to o
    If (i) Array1 = Array1 (j) Then

    On the other
    If HS. Account.IsDescendant (TargetAcct, Array1 (j)) then
    TargetAcct = Array1 (j)
    POS = j
    End if
    End if
    Next

    Array2.Add TargetAcct
    Array1.Remove (TargetAcct) "delete the account that has been added to the new list from the original list
    y = y - 1
    Loop While (y > 0)
         
    For each a1 of array2
    HS. AddMembertoList a1
    Next
    HS. AddMembertoList "BALANCE_SHEET".

    End Sub

    Once the list of members was in place, I used EN studio conditionally format the lines I need back. I'd appreciate any suggestions on how to code it better.

    Under the direction of: MR January 31, 2013 14:57

  • The PHP/MySQL dynamic drop-down list

    I know this should be easier he became... I even bought two new books on PHP and Dreamweaver, and I'm still lost.

    I am trying to create a very simple search for a Web site. This research would be a category based with a drop-down list only search. There would also be an admin section that would add new records to the DB.

    So far, I have created a basic admin page that submits new records to the appropriate categories.

    I created a simple search with a dynamic Drop Down page, and I have created a basic results page.

    If the problem I have is that the Drop Down dynamic list shows the names of similar category according to the number of records exists. Where it should show only the unique category names.

    Once selected, the results page and the records are displayed correctly using a dynamic array.

    Anyone know what I should do to change this dynamic list so that it does not display the duplicate names?

    Thank you.

    destind4film wrote:
    > Can give you details on how to do it. I saw this same response in another
    > post in the forums but I do not understand where this setting is.

    This is a very basic SQL query. The SEPARATE after that SELECT keyword ensures
    that duplicate records are removed from the Recordset.

    > I checked my phpmyadmin and there is an option for single, but it will not
    > work for categories in my PB because there are naturally several entries
    > with the same name of category attached.

    UNIQUE is a type of index that forces a column to store only unique values.

    > I don't see this option in DW.

    You will not. Dreamweaver provides the absolute basics to create the
    code for working with a database. Unless you want to be severely limited in
    what you create, you have to learn a few basics of database
    design and build your own SQL queries.

    To add SEPARATE to your basic SQL query, you must click on the Advanced
    button in the Recordset dialog box and insert it into the SQL query by hand.

    --
    Adobe Community Expert David Powers
    Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • How to specify the dragdrop function for an added list of dynamically?

    I enclose you dynamically a list item to a component of the canvas and the list to be able to accept items from other lists as a droppable. Due to the nature of my application, I create list when running and it cannot be created in mxml (since there is an undetermined number of these lists, which is known only at run time). My problem is that I can't find a way to set a custom function dragDrop on such an added list of how dynamic (I need such a function of error checking). I enclose the code for a version of my problem here.

    In this example, in the list below, I can drag the items to the first canvas and have my custom function executed but how would do the same for the second canvas? Flex Builder doesn't let me specify the property "dragDrop" of the List object. (My guess is I could have her labeled as something else?) I'm not sure.)

    Thank you very much in advance!
    Vineet

    list.addEventListener (DragEvent.DRAG_DROP, dragDropHandler)

  • error AVCFPlayerSetclientEnforcedExternalProjectionMethod is not found in the AVFoundationCF.dll dynamic link library

    I tried to update my iTunes this weekend.  Now, I can't open it I get this error: AVCFPlayerSetclientEnforcedExternalProjectionMethod is not found in the AVFoundationCF.dll dynamic link library is on a Windows 7 computer.  I tried to re - install outside of iTunes and repair.  But no luck.  Should I uninstall iTune and then re-install?  Help.

    These errors can usually be fixed by removing the offending dll, then fix the component it is programs and features Control Panel. AVFoundationCF.dll belongs to Apple Application Support and are normally in

    • C:\Program Files\Fichiers Files\Apple\Apple Application Support or
    • C:\Program Files (x 86) \Common Files\Apple\Apple Application Support

    where the name of the Program Files folder may vary depending on the region.

    For general advice, see troubleshooting problems with iTunes for Windows updates.

    The steps described in the second case are a guide to remove everything related to iTunes and then rebuild what is often a good starting point, unless the symptoms indicate a more specific approach. Review other cases and a list of documents to support further down the page, in which case one of them applies.

    More information area has direct links with the current and recent if you have problems to download, must revert to a previous version or want to try the version of iTunes for Windows (64-bit-for old video cards) as a workaround for the problems of performance or compatibility with third-party software.

    Your library must be affected by these measures, but it is also related to backup and recovery advice if necessary.

    TT2

  • 13 error on file of the list in temp.vi.

    The attachment contains a program to copy a file from 1 folder and paste it into another folder. But when I try to run the code it shows an error.

    13 error on file of the list in temp.vi.

    Possible reasons:

    LabVIEW: The file is not a resource file.

    C:\Users\MadhavaG\Desktop\Govind\An automated test set-up for dynamic characterization of the IGBT.pdf

    Can someone help me as to why the error occurs and how to overcome the error. Thanking you.


  • Progress based on the list of the folder with multiple files in a folder

    I use the function list folder of LabVIEW and want to see progress, because it takes a long time (20 seconds) to load all the files in an array.

    How can I do this?

    See ListFolder exemple.jpg

    Regards Ben Arts

    Ben Arts wrote:

    I showed a small image is everything to do the job.

    There are about 3000 files and the file is a server.

    Well, who would certainly do, as much as you said that it is on a server, so a network drive.

    In this case, I was looking for a progress for the folder in the list to use it in an indicator of progress for the user.

    Unfortunately, there is no mechanism for it. Maybe you can organize the files so that you can get a list of them in 'chunks', based on a search pattern. Or perhaps you can organize them into folders so that you dynamically fill subfolders when a user wants to see what is inside.

    Cancellation: having 3000 + files in a folder is a bad way to orgranize files, especially on a server, as leading to a huge amount of e/s files and network I/O on the server load.

  • CSS refresh after javascript DOM change (tab Ajax control) and also refresh the list of objects of Navigation

    Hi all

    When I access a Web page, that I created in the browser or Widget that uses an ASP.NET Ajax Control Toolkit Tabs the action of switching between tabs works well but the tab header does not reflect the change to display the active tab.

    In a standard browser of the tab header will be change / light tone based on the css classnames active Ajax control for settings changes dynamically in the DOM when switching between tabs and I was wondering if maybe the BB browser will not reflect/refresh css when changes on the client side affect the DOM? If that's the case (?) is there a way to force that change somehow?

    Also in the same direction and on the similar question I posted yesterday on switching between Navigation power user mode in a Widget, so javascript client-side dynamically is change the 'x-blackberry-focus' of a DOM object possible to have the change reflected in the Navigation objects? Or is the list of objects that can be traversed only generated load initial page and cannot change without a new post?

    Thank you

    Derek

    I solved the problem with the Ajax Control Toolkit TabContainer uisng having to do a "dummy" DOM change in the TabHeader after that the tab is passed between the tabs then forcing the refresh and repaint the tab headers.

  • How to handle the list manager correctly?

    Hello

    I am a student and I had to make a simple request to APEX.
    It is a part of modelling on the project:

    apex_ask.jpg

    As you can see, I have two relationship 'n - n' and a '1-n ".
    I want to create a user page in order to allow him to add a 'work' (work) but this "object" should be linked with the "n" type (type), "n" person and "n" copy.

    I am currently working on this page:

    scrennshot_apex.JPG
    As you can see, I have two list manager.

    I try a simple test:

    If I click on "region with dynamic action button" called click me! a short javascript code to show me the content of the second list manager

    id_personne = $v("P13_PERSONNE");
    alert(id_personne);
    

    the result looks like "40:30:4:6".

    I want to in PL/SQL, but I don't know how to do this:

    • Get the value of the Manager of the list (like javascript)
    • Get every issue of '40:30:4:6' in a LOOP

    Currently my PL/SQL looks like:

    DECLARE
        v_personne VARCHAR2(40) := '3:42:22:4:1:5';
        v_cptr NUMBER;
        LN$I pls_integer := 0;
    BEGIN
        v_cptr := regexp_count( v_personne, ':' );
        LOOP
            LN$I := LN$I + 1 ;
            dbms_output.put_line( to_char( LN$I) ) ;
            exit when LN$I >= v_cptr ;
        END LOOP;
    END;
    /
    


    I'm only counting the number of ': ' for loop.

    Kind regard

    Hello

    2909908 wrote:

    Please update your profile name with an explicit name, check out this video: https://www.youtube.com/watch?v=_FD80PU41k8

    Hello

    I am currently working on this page:


    As you can see, I have two list manager.

    I try a simple test:

    If I click on "region with dynamic action button" called click me! a short javascript code to show me the content of the second list manager

    1. id_personne = $v ("P13_PERSONNE");
    2. Alert (id_personne);

    the result looks like "40:30:4:6".

    I want to in PL/SQL, but I don't know how to do this:

    • Get the value of the Manager of the list (like javascript)
    • Get every issue of '40:30:4:6' in a LOOP

    Currently my PL/SQL looks like:

    1. DECLARE
    2. v_personne VARCHAR2 (40): = "3:42:22:4:1:5";
    3. v_cptr NUMBER;
    4. LN$ I pls_integer: = 0;
    5. BEGIN
    6. v_cptr: = regexp_count (v_personne, ' :');)
    7. LOOP
    8. $ LN I: = LN$ I + 1;
    9. dbms_output.put_line (to_char (LN$ I));
    10. When out LN$ I > = v_cptr;
    11. END LOOP;
    12. END;
    13. /

    I'm only counting the number of ': ' for loop.

    Kind regard

    You can use STRING_TO_TABLE to process the values of list manager.

    see the example given below

    DECLARE
      l_vc_arr2 APEX_APPLICATION_GLOBAL.VC_ARR2;
    BEGIN
      l_vc_arr2 := APEX_UTIL.STRING_TO_TABLE(:P13_PERSONNE);
      FOR z IN 1..l_vc_arr2.count LOOP
        htp.p(l_vc_arr2(z));
      END LOOP;
    END;
    

    Visit this link for reference: http://docs.oracle.com/cd/E11882_01/appdev.112/e12510/apex_util.htm#AEAPI186

    Hope this helps you,

    Kind regards

    Jitendra

  • Update of the lists?

    When you intersect one list, or who is a unique snapshot of the lists/filters/etc have intersected, is constantly update?

    Sound once, the contacts are added to a list, but this list is so dynamic in some way.

Maybe you are looking for