List of dynamic values with more than 2 columns

I have a dynamic LOV with a UNION. I am selecting a display and return value, but I need to order the records by a 3rd field which is different in each of the selects. Unfortunately the LOV yells at me if I try to do. Is this in any way about this?

Select C.name d, C.pk_id r, C.order x
of ' #OWNER # '. " STU_BASE' C, #OWNER # .student_list B, #OWNER # .student_list_det A
UNION
Select B.name d, B.pk_id r, A.seq_id x
of ' #OWNER # '. " STU_BASE' B, apex_collections A
where A.collection_name = 'STUDENT_LIST' and
B.pk_id = A.c001
order by 3

Try

select d,r from
(
select C.name d, C.pk_id r, C.order x
from "#OWNER#"."STU_BASE" C, #OWNER#.student_list B, #OWNER#.student_list_det A
UNION
select B.name d, B.pk_id r, A.seq_id x
from "#OWNER#"."STU_BASE" B, apex_collections A
where A.collection_name = 'STUDENT_LIST' and
B.pk_id = A.c001
order by 3
) 

CITY

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
    -------------------------------------------------------------------

  • Tables compressed with more than 255 columns

    Hello

    Anyone for a sql to find tables compressed with more than 255 columns.

    Thank you

    Jonu

    SELECT table_name,

    County (column_name)

    Of utc user_tab_columns

    WHERE utc.table_name IN (SELECT table_name

    From user_tables

    Compression WHERE = "ENABLED")

    HAVING Count(column_name) 255 >

    GROUP BY table_name

  • How to list all the vm with more than one network card?

    Hello

    Is it possible to only list all my s vm in my environment with more than one network card?

    I tried using the Get-NetowrkAdapter cmdlet, but could not get the desired results.

    Get - VM | Get-NetworkAdapter | Select-Object Name. ConvertTo-HTML-head $a - body "Virtual Machines < H2 > < / H2 > ' | Out-file D:\vms.htm

    Thank you

    Hello, AGFlora-

    Of course, you can do this with the standard as cmdlets:

    ## using standard cmdletsGet-VM | Select Name, @{n="NumNICs"; e={(Get-NetworkAdapter -VM $_ | Measure-Object).Count}} | ?{$_.NumNICs -gt 1}
    

    Or, if you want to get the results a little (or a lot) more quickly, you can use the cmdlet Get-view as:

    ## fast-like, using Get-ViewGet-View -ViewType VirtualMachine -Property Name,Config.Hardware.Device | Select Name,@{n="NumNICs"; e={($_.Config.Hardware.Device | ?{$_ -is [VMware.Vim.VirtualEthernetCard]} | Measure-Object).Count}} | ?{$_.NumNICs -gt 1}
    

    Those are both by selecting the names of virtual machines and their number of network cards.  Then you can direct this output to Export-Csv, ConvertTo-HTML, what you like.  What to do for you?

  • How to store values with more than 50 KB

    Hi all

    I need to print some records in a single invoice lines line some pre-required data, I went into the loop and they stored in a variable as


    file: = | LINE1. Line2;


    This logic works very well until the characters are less than 32 k, but beyond that, it gives an error, how can I store the values larger than this size? any advice would be very helpful.


    Thanks in advance


    Thank you
    Pratap
    declare
      myClob clob;
      myVar varchar2(1000) := rpad('x',1000,'x');
    begin
      for i in 1..100
      loop
        myClob := myClob || myVar;
      end loop;
      dbms_output.put_line('Lenght of clob is ' || length(myClob));
    end;
    
  • Remove the statement with subquery with more than 1 columns

    Hi all

    I want to delete the data in the kpi_logs table for which the kpi_def_id column is less than the max (timestamp). The timestamp is the date data type. I wrote below query but its throwing an error as an SQL error: ORA-00936: lack of expression.

    DELETE FROM KPI_LOGS WHERE (Select MAX (TIMESTAMP), KPI_DEF_ID of the KPI_DEF_ID KPI_LOGS GROUP);

    Hello

    user12251389 wrote:

    I want to delete the data in the kpi_logs table for which the kpi_def_id column is less than the max (timestamp). The timestamp is the date data type. I wrote below query but its throwing an error as an SQL error: ORA-00936: lack of expression.

    DELETE FROM KPI_LOGS WHERE (Select MAX (TIMESTAMP), KPI_DEF_ID of the KPI_DEF_ID KPI_LOGS GROUP);

    Whenever you have a question, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the accurate results you want from this data, so that people who want to help you can recreate the problem and test their ideas.

    If you ask about a DML operation, such as DELETE, and INSERT statements, you post should show what looks like the tables before the DML, and the results will be the content of the table changed after the DML.

    Explain, using specific examples, how you get these results from these data.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum:

    You want to keep only the maximum timestamp for the entire table, or you want the maximum timestamp for each distinct value of kpi_def_id?

    If it is just the maximum timestamp for the whole picture, then

    DELETE FROM kpi_logs

    WHERE the timestamp<>

    SELECT MAX (timestamp)

    OF kpi_logs

    );

    If you want to keep the maximum timestamp for each individual value phew kpi_def_id, then:

    DELETE FROM kpi_logs

    WHERE (kpi_def_id, timestamp NOT IN)

    SELECT kpi_def_id

    MAX (timestamp)

    OF kpi_logs

    GROUP BY kpi_def_id

    );

    assuming that no column can be NULL.

    Moreover, the TIMESTAMP is a data type, similar to this DAY.  You'll only cause confusion by saying it is a type of data when it is really another.  In addition, TIMESTAMP is a keyword from Oracle, is not a very good column name.  Why not give your column a name more meaningful, accurate, such as create_date or entry_dt?

  • Understand the joins with more than one column?

    Hi all

    I want to know if I understand.

    When you join two tables, and the join condition has four columns (two for each table) as follows:

    where d.deptno = e.deptno

    and d.name = e.name

    I think it means the engine must choose "the selection list" when he sees a number of d.deptno (for example 10) equal number in e.deptno, and

    the d.name from the same folder (10) must be equal to the value of e.name.

    I understand?

    Another example, I want to understand, when we say:

    where d.deptno = e.deptno

    and d.deptno = s.deptno

    This means that the number (10) should for example equal to one (10) in the table (e), and the same 10 must be equal to a value in the table (s)?

    Am I wrong?

    Thank you

    Hello

    Yes, what you say is right; but don't take my word for it.  Try it yourself.   Create a couple of small tables.  Insert some data that matches (and will appear in the results of joints) and others that does not (and should not be in the results) and see if the results are what you expected.

  • a value of more than one column

    I have two tables: MANAGER_MAP [info on the Manager and the project name, it provides management of stores] AND TIME_REC [stores details of the project and the time spent in hours for this project and the date for which the time is recorded];

    DETAILS OF THE TABLE: -.
    CREATE TABLE MANAGER_MAP)
    MANAGER_NAME VARCHAR2 (50).
    PROJECT_NAME varchar2 (50));

    CREATE TABLE TIME_REC)
    PROJECT_NAME VARCHAR2 (50).
    TIME_IN_HRS NUMBER (5),
    DATE OF WORKING_DATE);


    -REM INSERTION in MANAGER_MAP
    Insert into MANAGER_MAP (MANAGER_NAME, PROJECT_NAME) values ("SARA", "P1, P2, P3');
    Insert into MANAGER_MAP (MANAGER_NAME, PROJECT_NAME) values ("LARA", "P4, P5");
    Insert into MANAGER_MAP (MANAGER_NAME, PROJECT_NAME) values ('ALEX', ' P6, P7, P8, P9, P13');
    Insert into MANAGER_MAP (MANAGER_NAME, PROJECT_NAME) values ("ROY", "P10, P11, P12");

    -REM INSERTION in TIME_REC
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P1', 8, to_timestamp (February 13, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P2', 3, to_timestamp (February 13, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P3', 3, to_timestamp (February 13, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ("P4", 2, to_timestamp (February 13, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ("P5", 5, to_timestamp (February 13, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P6', 7, to_timestamp (February 13, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P7', 8, to_timestamp (February 13, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P8', 9, to_timestamp (February 13, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ("P9", 9, to_timestamp (February 13, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P10', 1, to_timestamp (February 13, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ("P11", 2, to_timestamp (February 13, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P12', 3, to_timestamp (February 13, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ("P13", 5, to_timestamp (February 13, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P1', 4, to_timestamp (February 14, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P2', 6, to_timestamp (February 14, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P3', 7, to_timestamp (February 14, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ("P4", 8, to_timestamp (February 14, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P5', 9, to_timestamp (February 14, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P6', 2, to_timestamp (February 14, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ("P7", 4, to_timestamp (February 14, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P8', 6, to_timestamp (February 14, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ("P9", 7, to_timestamp (February 14, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P10', 3, to_timestamp (February 14, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ("P11", 5, to_timestamp (February 14, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P12', 7, to_timestamp (February 14, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ("P13", 5, to_timestamp (February 14, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P2', 5, to_timestamp (February 15, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P3', 2, to_timestamp (February 15, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P5', 6, to_timestamp (February 15, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P6', 9, to_timestamp (February 15, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ("P11", 6, to_timestamp (February 15, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P12', 9, to_timestamp (February 15, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ("P13", 3, to_timestamp (February 15, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));
    Insert into TIME_REC (PROJECT_NAME, TIME_IN_HRS, WORKING_DATE) values ('P4', 9, to_timestamp (February 15, 12 ',' DD-MON-RR HH.MI.)) SSXFF AM'));

    I need the output in this format: -.
    Manager_name, the sum of timeinhrs
    ex: Sara 38
    That is to say for all managers the total number of hours for all the projects it manages must be found...
    Sara is mapped to P1 P2 P3
    If the sum of hours in p1 = 12
    sum hours in p2 = 14
    sum in p3 = 12 hours
    so sum = 38
    the biggest obstacle I face, is that projects are mapped by commas in the same column
    ex manager_name project
    Sara p1, p2, p3
    which means I have to get the details of all the p1, p2 and p3
    and there is no specific limit on the number of projects that can be mapped to the Manager.

    Oh great wizards! kindly help :)
    SQL> select mm.manager_name
      2       , sum(tr.time_in_hrs) total_hrs
      3  from manager_map mm
      4       join time_rec tr on instr(','||mm.project_name||',', ','||tr.project_name||',') != 0
      5  group by mm.manager_name
      6  ;
    
    MANAGER_NAME     TOTAL_HRS
    --------------- ----------
    ROY                     36
    SARA                    38
    LARA                    39
    ALEX                    74
     
    

    ... and I definitely agree with Centinul.

  • replacement selection on 2 columns and return more than 1 column lists

    Hello

    I try to build 2 other selection lists and each selection list should return more than 1 column

    2 PART_ID and PART_SPECIFICATION columns

    Now I build a select on PART_ID as list

    Select part_id d, part_id parts r;

    The result should be:

    PART_ID and PART_SPECIFICATION a PART_ID column must be the text of PART_SPECIFICATION

    The selection based on PART_SPECIFICATION list should be like

    Select d, part_id parts r part_specification;

    Now, it should be posted part_specification in PART_SPECIFICATION and part_id in PART_ID.

    This is because a user knows the part_id and the other knows only the specification

    Please help me

    Siegwin

    Hi Siegwin,

    Check your application Page 7 (copy of the 500 page) using the selection instead of plugin list, it gives all the values.

    and works very well,

    use ajax process to get the Xml data in page elements

    Here are the changes

    application process: getData

    point of application: TEMPORARY_APPLICATION_ITEM

    create a function in the html header pull_multi_value() page

    and he gave the floor to point page p7_empno on the attribute of the html form element as onchange = "pull_multi_value (this.value)"; ""

    This can help you.

    Leave.

  • need to vmdk with more than size of 2 TB

    Hello

    I install ESXi5 on 2 x 72 > RAID 5 and create VMs on it (2008), now I have to create vmdk and assign it to this virtual machine with more than 2.5 TB of size.

    I creat new RAID set and now I have data store with 3 TB space, but I can't to creat 2.5 or more to vmdk

    How can I create?  How can I activate the RAW Disk Mapping on the local storage?...

    you will not see local hard drives, it is already in the RAID, then only you can see the raid volume. Which is given below

    MPX.vmhba2:C0:t0:l0<-- disk="">

    MPX.vmhba2:C0:t0:l0:1<-- partition="">

    MPX.vmhba2:C0:t0:l0:2<-- partition="">

    It is not recommended to violate the recommended settings and rules given by vmware, it will raise many problems and if it is in production you will be screwed. On the thing you can do, is to create dynamic disks and create a split volume.

    http://www.Techotopia.com/index.php/Creating_and_Managing_Simple_and_Spanned_Volumes_on_Windows_Server_2008

    If you still want to go for RDM local pause, the RAID and see if it detects the ESX or not and if you can see the individual disks and if you are able to make RDM with these discs, then back to the VM will intervene only individual HDD so no raid and protection? So it is very risky

  • Query to find records with more than 2 decimal places.

    I have written the below query to find records with more than 2 decimal places, but it is returning records with decimal places 1 & 2. 
    The datatype of the AMT column is NUMBER (without any precision).
    
    SELECT amt  FROM amount_table
     WHERE substr(amt, instr(amt, '.')) LIKE '.%'
           AND length(substr(amt, instr(amt, '.') + 1)) > 2
    Output:-

    AMT

    * 41591.1*
    * 275684.82*
    * 64491.59*
    * 3320.01*
    * 6273.68*
    * 27814.18*
    * 30326.79*
    131.8413635
    162.5352898
    208.5203816
    8863.314632
    22551.27856
    74.716992
    890.0158441
    2622.299682
    831.6683841
    * 1743.14*
    2328.195877
    3132.453438
    5159.827334
    3.236234727
    37.784
    Thanks

    Hello

    user1585440 wrote:

    when i inserted fee_amt as 41591.0999999999  it is displayed as 41591.1 in the output i.e,
    
    insert into amount_table (line_number,fee_amt) values (100,41591.0999999999);
    
    select fee_amt from amount_table  where line_number = 100. this query shows the output as below
    
    fee_amt
    
    41591.1
    
    The fee_amt column has number as datatype (without precision)
    
    Why it is automatically shown rounded off as 41591.1? 
    

    Published by: user1585440 on December 28, 2010 04:50

    You use SQL * more your front end?

    SQL * Plus has a fixed width to display all columns. The default for numbers is 10 characters. If necessary, SQL * Plus will be round a number or the use of scientific notation, to represent the number of the expected number of characters.
    You can use the SQL * more "SET NUMLARGEUR" to change the default view for all the numbers of orders, or "COLUMN" to set a sepcific format in an individual column.
    If you explicitly convert your channel numbers in a query, SQL * Plus adjusts the column width to whatever is needed. For example

    SELECT  TO_CHAR (fee_amt, 'TM')     AS fee_amt_d
    

    "TM" is the default format; You can call TO_CHAR with a single argument, if you prefer.

  • The AirPod are compatible only with iphone 7? Or we can use it with more than 6 s... or any android device?

    The AirPod are compatible only with iphone 7? Or we can use it with more than 6 s... or any android device?

    Here are the tech specs: http://www.apple.com/shop/product/MMEF2AM/A/airpods

    They are bluetooth devices, so they work with the iPhone 5 or more.

    See you soon,.

    GB

  • After using groups of tabs earlier today, now whenever I close FF with more than 1 open tab, FF don't ask me to confirm before closing

    After using groups of tabs earlier today, now whenever I close FF with more than 1 open tab, FF don't ask me to confirm prior to closing. FF always asked me to confirm in the past and no settings have been changed before you try tab groups. Then when I open FF it again all the tabs I had open are still there. I tried refreshing FF and erase history, but that did not work. It's almost as if FF think windows and tabs I have open are a group of tabs, and he won't let me get rid of this group. How to stop groups of tabs now that I have them? Or is there something else? None of this was going on until this morning, I played with tab groups. I was curious what it was - it's going to make me kill one of these days lol.

    Note that using "show my windows and tabs from last time" as the start setting will also prevent Firefox to display an alert when you close the window.

  • 5.6.1 pages: How to create a table with more than 999 lines?

    5.6.1 pages: How to create a table with more than 999 lines?

    The table on Pages v5.6.1 line selector is limited 3-digit, as it is in Pages ' 09 v4.3. Either use LibreOffice Writer, who does not have any constraint line on processing tables 3-digit, or any application spreadsheet for top 3-digit row needs.

  • Noisy HDD downloading with more than 2 Mbps Internet

    When I download with more than 2 Mb/s to the internet, I hear a noise continuous scratchin/scratching. After I stop downloading the noise disappears. It has 5000 hours working time.

    Toshiba 120 GB SATA/300 5400 RPM 8 MB 2.5 "MK1246GSX...

    Hello

    First of all I must say it is really hard to say something about it without having heard this noise you want to say.

    Generally speaking, it of normal that you hear some noises during writing or reading process of the HARD drive.
    You can test your HARD drive for bad sectors using Drive Fitness Test. Which is a freeware tool that can check the HARD disk.

Maybe you are looking for