use a (selection list) element as the column name in the select?

I have a popup LOV key based on a select (dynamic list of values)
I want to display and return - select columns in the select statement to be determined by another list.

I tried:

Select distinct: P133_COLUMN d: P133_COLUMN r
FROM MyTable

but then I don't you the value of: P133_COLUMN... so if: P133_COLUMN is 'EMPNO' LOV popup displays the text "EMPNO" and referred the text 'EMPNO', not the empno column values...

If I change

Select distinct P133_COLUMN d & P133_COLUMN r
FROM MyTable

I get the standard
"LOV query is not valid, a display and a return value is needed, the column names must be different. If your query contains a query online, the first CLAUSE in the SQL statement must not belong to the query online. »

Anyone?

Also, I was wondering if it is possible to set the textfield object in the item popup LOV to accept the input text directly as well as the selected value, but the first part of the question is the important part.

Concerning

Andreas

Hello Andy,

Change your LOV to something like this:
'select' return. : P133_COLUMN |' d, ' | : P133_COLUMN | "as r from myTable";

Greetings,
Roel

http://roelhartman.blogspot.com/

Tags: Database

Similar Questions

  • Diagram of all the tables list of primary key column names

    Hi people,

    I have a Scott user for example, I want to retrieve all tables primary key column names in the user Scott.

    can someone help me please.

    Thanks in advance,
    karmaya

    You can log in to SCOTT and try this

    select c.constraint_name
         , cc.table_name
         , cc.column_name
      from user_constraints c
      join user_cons_columns cc
        on c.constraint_name = cc.constraint_name
     where c.constraint_type = 'P';
    
  • The list by using a converter of element with the variable row height

    Hi all

    I am trying to create what amounts to a list of comments. A comment is a comment string and a name, and all comments will be placed in a list in order to scroll vertically to display all comments.

    Here is an example of the sample:

    Application code:

    <? XML version = "1.0"? >
    "< mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml" > "
    < mx:List dataProvider = "{list}" itemRenderer = "ListRenderer" width = "200" variableRowHeight = "true" wordWrap = "true" >
    < / mx:List >

    < mx:Script >
    <! [CDATA]

    [Bindable]
    Table: private list var = new Array)
    {Comment: 'Test', name: 'Joe'},
    {Comment: 'This is a long comment that must wrap onto multiple lines,' name: 'Joe'},
    {Comment: 'Test', name: 'Joe'},
    {Comment: 'Test', name: 'Joe'},
    {Comment: 'This is a long comment that must wrap onto multiple lines,' name: 'Joe'},
    {Comment: 'Test', name: 'Joe'},
    {Comment: 'Test', name: 'Joe'},
    {Comment: 'This is a long comment that must wrap onto multiple lines,' name: 'Joe'},
    {Comment: 'Test', name: 'Joe'}

    );


    []] >
    < / mx:Script >
    < / mx:Application >


    Code rendering engine article:

    <? XML version = "1.0" encoding = "utf-8"? >
    "< mx:VBox xmlns:mx = ' http://www.adobe.com/2006/mxml" > "
    < mx:Text text = "{data.comment}" width="100%"/ > "
    < mx:HBox width = "100%" horizontalAlign = "right" >
    < mx:Text text = "-{data.name}" / >
    < / mx:HBox >
    < / mx:VBox >


    When I run this list it is created with each object being rendered properly, but keep an eye on the height of comments when you scroll from top down (it may take a few scrolls to see), when a comment moves out of the visible range and then comes back in the field of the visible, the height of comments seems back to zero itself , you will see the name disappear (and sometimes reappear again). Can one, someone explain what is happening? Two, this is the best approach, I have also considered using a vbox and Repeater, but so far the current implementation is the closest, just to create the desired result. Thanks in advance.

    OK I found how to fix this problem:

    new code of itemRenderer:


    http://www.Adobe.com/2006/mxml">




    Override the set method of the property data.
    override public function set data(value:Object):void {}
    Super.Data = value;

    If (value! = null)
    {
    commentText.text = value.comment;
    commentText.validateNow ();
    }
    }
    ]]>

    The important thing here is to substitute the data value method, set the comment string and then call validateNow(); This will ensure that the textHeight is updated and the right height is used

  • Can be used as headers page elements in the header of the report?

    Apex 4.1 / 11g

    Hello

    In a report, the headers are generally select alias of the instructions. However, in the attributes of the report, we can change the column header to any text of our choice. I was wondering if we can replace that with a page element with something like: P8_item?

    Thank you
    Sun

    Published by: ryansun on June 28, 2012 23:00

    ryansun wrote:
    Apex 4.1 / 11g

    Hello

    In a report, the headers are generally select alias of the instructions. However, in the attributes of the report, we can change the column header to any text of our choice. I was wondering if we can replace that with a page element with something like: P8_item?

    You can use, but using this syntax * & P8_item.*

    And make sure that you complete the items before the report area

  • Using elements in the field and the transfer of my computer at home?

    I want to use my ultrabook with elements in the field in order to sort, shoot, and edit the images in time.  When I go home can I just transfer these files from my computer at home and use Get Photos to add them to my main catalog?  Tags, version sets and changes made in the field will survive, so that it would be the same if I had done this treatment on my computer at home in the first place?

    Here is a more detailed workflow suggestion, assuming you want to do the bulk of your organization in the computer field.

    It is based on the notes above and the use of a backup PSE to transfer photos and catalog of the field at home a computer.

    -Create a new catalog on your computer in the domain before you download files.

    -organize entirely unconstrained...

    -Prepare a later import in your main catalog, after the backup and restore processes (details to come...) or wait until after the restoration to make this work.

    -Backup to a disk external (there are beautiful portable USB drives in ideal for this)

    -(Note: quand vous avez votre sauvegarde, il est sûr de re-formater vos cartes.)

    -Restore from the external hard drive to your computer at home (custom destinatin). You will have a new catalogue with all your changes.

    -If you did not already preparing indicated above, it is here. Select the files in the batteries and common as label "IsInAStack", and then select the version games and assign a label like "IsInAVersion". Now, you can also assign keywords to the components of cells. For albums, use the common keywords. If you need save the order in albums (for slideshows...) export and rename the files as explained above and reimport them in your catalog.

    -Now you can re - import the files in your main catalog

    -To re - create batteries select files with "IsInAStack" or their label and either stack manually or with the help of the feature automatically 'suggest piles. Sets of version can be restored only like batteries. Albums must be recreated: you drag the selection based on the keyword corresponding to the album.

  • using elements of the table in the order?

    Hello

    I created a table which includes four-part numbers. I want to stimulate each element one after the other. After the creation of my program, I see that only the first element of the array is enabled, but not the other RAS.

    I actually use this program to stimulate the four different smells. I join all of the program that controls the olfactometer and the framework of this program that I have problems with.

    If any of you have any idea how I can solve the problem and can use all different smells/elements during the experience?

    Sincerely,

    Samia Alam.

    You have a double case of 'localitite' and 'sequencetitus '.  No need to use local variables and structures of the sequence.

    Use wire instead of local variables where you can.  If wire you your table type of Stimulation through the wall of the loop, you can set it for automatic indexing.  This means that each loop iteration will use each element of the array in turn.  Then you won't need the Index array function, or need to wire a 4-Terminal N of the loop.

    (Otherwise, we could plug your i of iteration loop Terminal to the terminal of the index of the Array Index function.)

  • How to use the elements in the array

    Hi, I am trying to automate a questionnaire using table.

    In the compositionReady for the scene

    SYM. Actual = 0;

    sym.arr = ['Hi', 'Love', 'You'] / / this is my picture of the issue.

    sym.checkArr = function() { / / this function I use to check the issue table whis I'll use.}

    sym. Question = arr [real];      I want to use the value 'Hi' and then increase my 'real' var and then use the value 'Love '.

    }

    In my symbol calendar, I use a trigger in the trigger that I use

    SYM. Stop();

    sym.quest = sym.getComposition () .getStage (). Question; / / I get the value of the Question;

    Sym. $("Ask") .html (quest);                                                        "Ask" is an empty textfield;

    sym.getComposition () .getStage (invested) ++;                    Increase 'real' for the nex time.

    But the code does not work, I think that the problem is the way I use the array index.

    Help, please!

    Thank you =)

    Hello

    chino_10 wrote:

    at the outbreak of timeline you why did you use a local variable?

    It is advisable to use local variables when possible. The quest variable apply only to this trigger, and it will not be postponed to another trigger in the same timeline. So when you use a trigger to set the HTML for a text element in the same timeline, I find cleaner to assign a new value of a local variable HTML.

    chino_10 wrote:

    and if you call the 'real' global variable of Manager compositionReady of why didn' there you call him with all the way like ' sym.getComposition () .getStage (invested) ++; '?

    I think I have didn't express it as clearly as I could have. When you declare sym.actual in compositionReady, you actually declared a variable whose scope is the symbol of the main stage - it is not a global variable. To declare a global variable (which is not always recommended), your code in compositionReady would be:

    real = 0;

    This real variable would now be accessible from any element/symbol in the composition simply by assigning a value to the membership. You can see how quickly this could be embarrassing.

    So back to the scope of variables: If you declare a symbol variable using sym.varName, any element in the same scope may call using sym.varName. If your main scenario triggers can call without using the full address of sym.getComposition () .getStage () invested ++. Instead, you can simply use ++ sym.actual. Less code and easier to read. But if you call from another symbol (outside), you need to use the full, addressing the address actually the variable, i.e., sym.getComposition () .getStage () invested ++.

    HTH,

    Joe

  • Can I use * and the list of the column names in a select query

    PLSQL again.  Can I use * and the list of the column names in a select query, i.e. Select *, col1, col2 from Mytable.  When I do that my questions tend to the bomb.  Can do in other databases.

    Thank you

    Mike

    Hi, Mike,.

    If there is something else in the more SELECT clause *, then * must be qualified with a table name or alias.

    For example:

    SELECT Mytable. *, col1, col2

    FROM MyTable;

  • First element of the ADF/JSF select a drop-down list is empty

    Hello

    I'm using ADF/JSF and SelectOneItemList. Everything works fine, but the first item in the drop-down list is empty. Therefore, unless the user clicks on the drop-down menu, empty everything he sees is a text box with a drop down arrow. How do I:

    1. Add "Select" to the element highest in the list, so that the box is not empty. For example. If the list has 'empty here', 'Car', 'Train', 'Plane' - how to have the first item indicated as "Select"?

    2 get the first item in the list to display in the empty box. For example. If the list has 'empty here', 'Car', 'Train', 'Plane' - how to have the first item indicated as "car"?

    Thank you

    Use the attribute unselectedLabel of the component
    unselectedLabel = "Select".
    or
    Assistant of VO value for 'No. Selection' point.

  • Additional column names selected when you use the describe "popup" to select columns

    Hello

    In SQL Developer 3.2.20.09, if you use the popup describe the function on a individual table columns using Ctrl + click (not shift click choosing a range of columns) and select and then drag them to the SQL worksheet to find the column names, it includes all of the columns between the individual columns that have been selected.

    For example if I choose column 1 and 5, it includes 1,2,3,4,5 columns when I drag them through.

    Simple to reproduce on any table, just open the SQL worksheet, type the name of a table, open the popup describe and select some columns.

    Kind regards

    Steve

    Is not past in v4 ai2 it seems to be fixed.

  • The error message "no more virtual tiles can be allocated" appears when I try to use the effects in the quick edit mode in my 13 elements. The OK wand has to press several times for loading all effects models. The error returns when selecting th

    The error message "no more virtual tiles can be allocated" appears when I try to use the effects in the quick edit mode in my 13 elements. The OK wand has to press several times for loading all effects models. The error returns when you select the particular model.

    The problem does not appear, if PH 13 items is run in administrator mode.

    The available computer resources are rather big enough: INTEL CPU i7 4 cores, 16 GB RAM, 1 TB HDD + 32 GB SSD, Windows 8.1.

    Please, advice how to fix this problem? Perhaps, there is patch or update available?

    I had this problem with some of the choices menu in PSE13 when my drive to work was only a SSD with 53 GB of free space. I assigned a second disc of work (my data disc with ~ 2 TB of free space) and the error disappeared.

    Scratch disk settings can be found under preferences / Performance.

  • How to select data using the same remote database column name 3

    Hello


    Can anyone help me on how to get the data with the same remote database column names 3 and a unique nickname.

    E.g.

    SELECT *.
    B.SID, b.status, SUM (b.qty) qantity MAX (b.) date_as_of
    Of
    * ((table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) has, *)
    (* (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) b). *
    WHERE b.dept = 'finance '.
    AND a.position = "admin".
    AND a.latest = 'Y' AND (b.status <>"MLT") AND b.qty > 0;
    B.SID GROUP, b.status;

    NOTE: the instructions "BOLD" is just an example of what I want to do but I always get an error beacause of ambiguous column.

    Thanks to advnce. :)

    Published by: user12994685 on 4 January 2011 21:42

    user12994685 wrote:

    Can anyone help me on how to get the data with the same remote database column names 3 and a unique nickname.

    Not valid. This makes no sense and breaks all the rules of scope-resolution. And if it is in a single database, or uses tables in databases, is not relevant.

    Each object must be particularly well identified. If you cannot do this:

    select * from (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) a
    

    3 objects cannot share the same alias. Example:

    SQL> select * from (dual, dual) d;
    select * from (dual, dual) d
                       *
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    

    You need to combine objects - by using a join union or similar. He will have to be done as follows:

    SQL> select * from (select * from dual d1, dual d2) d;
    select * from (select * from dual d1, dual d2) d
           *
    ERROR at line 1:
    ORA-00918: column ambiguously defined
    

    However, we need to have unique column in a projection of SQL names - so the join of the need to project a unique set of columns. So:

    SQL> select * from (select d1.dummy as dummy1, d2.dummy as dummy2 from dual d1, dual d2) d;
    
    DUM DUM
    --- ---
    X   X
    
    SQL> 
    

    I suggest that you look carefully at what opportunities are and how it applies in SQL - and ignore if the referenced objects are local or remote, because it has no effect on the basic principles of scope-resolution.

  • How can we make a visible element on the screen based on the selection of an existing menu in the same screen

    February 2015 release OPA

    How can we make a visible element on the screen based on the selection of an existing menu in the same screen.

    I have a list box and a text box in the same screen.

    I have a visibility rule on the text box saying that it is only available for one of the selection in the menu dropdown.

    problem is now unless I hit the button next to the screen and return to the original screen the text box does not appear.

    Is there a solution to more to come this problem.

    Please help me

    The feature you describe is called "dynamic visibility" (http://documentation.custhelp.com/euf/assets/devdocs/february2015/PolicyAutomation/en/Default.htm#Guides/Policy%20Modeling%20User%20Guide/Interviews/Screens/Add_questions_to_screens.htm#Dynamic). It allows to control the visibility of another article on the same screen, without writing a separate rule of visibility and click on Submit.

    Using out-of-the-box functionality, you can have dynamic visibility based on Boolean values and value lists (but not regular drop-down lists).

    The example in the February 2015 User Guide based on a Boolean value on the same screen. See slide 27 of the bridge-features and benefits for an example of what it looks like to a list of value: http://www.oracle.com/technetwork/apps-tech/policy-automation/overview/opafeb2015featuresbenefits-2431219.pdf

    If you are wondering what is a list of values, see here: http://documentation.custhelp.com/euf/assets/devdocs/february2015/PolicyAutomation/en/Default.htm#Guides/Policy Modeling User Guide/Value_lists/What_is_a_value_list.htm

    See you soon,.

    Jasmine

  • Selection in the HTML extension list falls to the bottom of the Panel

    I use a selection list in an extension, and when there are a lot of elements in the list, the bottom of the list are outside the lower part of my extension Panel. There is no way to see the elements at the bottom of the list. I can use the arrow down in the area of selection to finally get the items at the bottom, but this is obviously not ideal.

    I know there is no way to control the length of the list in HTML, CSS, etc.

    Is there something that I lack in my manifesto or elsewhere which will cause the list display properly at the top of the Panel and not that it contains?

    Some other messages found around these forums. Looks like it's a bug experienced with Mac HTML panels. Hoping they fix one day.

  • subqueries, nested, using elements of the other party of the request

    Hi all
    I have a delicate problem, and I'll try to explain my best:

    DB version is 11.2.0.3.0
    create table product_list (product_id number,
                    project_name varchar2(30))
    
    create table products (product_id number,
                    project_desc varchar2(30))
    
    create table total_counts (product_id number,
                    total_count number,
                    project_name varchar2(30))
    
    create table fixed_counts (product_id number,
                    fixed_count number,
                    project_name varchar2(30).
                        fixed_date date)
                        
    create table product_rating (product_id number,
                    rating number,
                    quarter_last_updated number)
                        
    create table quarters (quarter_id number,
                    quarter_end_date date)
    
    
    insert into product_list values (1, 'Prod 1');
    insert into product_list values (2, 'Prod 2');
    insert into product_list values (3, 'Prod 3');
    
    insert into products values (1, 'Prod 1');
    insert into products values (2, 'Prod 2');
    insert into products values (3, 'Prod 3');
    
    insert into total_counts values (1, 2000, 'Prod 1');
    insert into total_counts values (2, 1000, 'Prod 2');
    insert into total_counts values (3, 500, 'Prod 3');
    
    insert into fixed_counts values (1, 1, 'Prod 1', to_date('01/01/2013','DD/MM/YYYY'));
    insert into fixed_counts values (1, 3, 'Prod 1', to_date('01/01/2013','DD/MM/YYYY'));
    insert into fixed_counts values (2, 50, 'Prod 2', to_date('01/01/2013','DD/MM/YYYY'));
    insert into fixed_counts values (2, 2, 'Prod 2', to_date('01/01/2013','DD/MM/YYYY'));
    insert into fixed_counts values (2, 3, 'Prod 2', to_date('01/01/2013','DD/MM/YYYY'));
    insert into fixed_counts values (2, 3, 'Prod 2', to_date('01/01/2013','DD/MM/YYYY'));
    insert into fixed_counts values (3, 8, 'Prod 3', to_date('01/01/2013','DD/MM/YYYY'));
    insert into fixed_counts values (3, 3, 'Prod 3', to_date('01/03/2013','DD/MM/YYYY'));
    
    insert into product_rating values (1, 1, 1);
    insert into product_rating values (3, 2, 2);
    
    insert into quarters values (1, to_date('01/10/2012','DD/MM/YYYY'));
    insert into quarters values (2, to_date('01/02/2013','DD/MM/YYYY'));
    My current query joins actually 2 tables 'TOTAL_COUNTS' and 'FIXED_COUNTS '. The FIXED_COUNTS table is updated every day when a product has a patch against it and the query returns a list of all products and their "fixed" rate percentage (used in an interactive report of the APEX).
    select A.PRODUCT, A.TOTAL, B.FIXED, a.PROD_ID, round((FIXED/TOTAL) * 100,  2) percent
    from (
    select sum(a.total_count) TOTAL, a.product_id PROD_ID, d.Product_desc PRODUCT
    from total_counts a, product_list c, products d
    where a.product_id = c.product_id
    and lower(a.project_name) = lower(c.project_name) 
    and c.product_id = d.product_id
    group by a.product_id, d.product_desc
    ) A
    JOIN 
    (
    select sum(b.fixed_count) FIXED, b.product_id PROD_ID, d.Product_desc PRODUCT
    from fixed_counts b, product_list c, products d
    where b.product_id = c.product_id
    and lower(b.project_name) = lower(c.project_name) 
    and c.product_id = d.product_id
    group by b.product_id, d.product_desc
    ) B
    on A.PROD_ID = B.PROD_ID and A.PRODUCT = B.PRODUCT 
    It gives me a result like:
    PRODUCT     TOTAL     FIXED     PROD_ID     percent
    Prod 1     2000     4     1     0.2
    Prod 2     1000     58     2     5.8
    Prod 2      500     11     3     2.2
    The application works very well and does exactly the job I need. However, I now a requirement that when a product gets a percentage rate 'fixed' more than 1% of the product gets a point added against her in a table 'product_rating' and I have to recalculate the percentage of the date, the item has been added (so no points added we take all 'fixed').

    To do this, I added 2 new tables: "product_rating" and "quarters". The "product_rating" table contains the Product_id and points, he has accumulated so far. It is updated once a quarter. 'Quarters' table simply contains the dates for us to use for calculations again.

    Actually, I need to replace this:
    sum(b.fixed_count) FIXED
    with something like this:
    if a product has a point against it in the "product_rating" table then we just show fixes from the date the point was added i.e. 
    select sum(b.fixed_count) from fixed_counts b, product_rating c, quarters d
    where b.product_id = c.product_id and c.quarter_last_updated = d.quarter_id
    and b.product_id = PROD_ID
    and b.fixed_date > (select quarter_end_date from quarters where quarter_id = the_last_quarter_updated)
    Based on the values in the tables above the percentages for "3 Prod' should now be 0.6.» It is because he received a product_rating the quarter 2, then the new calculation is based on all the "corrections" after this date (only the last March 1 13').

    I tried many ways to integrate this into the current query, but I can't make it work. Sorry for not adding the info from the entire table, but the tables total_counts and fixed_counts have many more columns that I removed the query so it would be easier to observe. Thanks in advance for your help. If I can add more info ask please.
    Tom

    Published by: on May 14, 2013 TomH 08:54

    Published by: on May 14, 2013 TomH 08:58

    TomH wrote:
    of course, to the right, thank you.
    I added some info table and data that will hopefully a little easier to understand.

    OK, thank you... to the future but please try and run the commands yourself for you sure they work. What you provided is close, but it has not executed immediately without modifications.

    I will start by expressing my concerns for your data model, it seems... well, for lack of a better word. Although you said you deleted a bunch of stuff to make the example. You have someone, you you work who can look at the model for you?

    With respect to the query, it's not pretty (I'm in a bit of a rush here) so you can probably clean it considerably. I just tried to show the basics of what you're going to have to do.

    ME_XE? with base_data as
      2  (
      3     select
      4        b.fixed_date,
      5        b.fixed_count,
      6        b.product_id ,
      7        d.project_desc
      8     from fixed_counts b, product_list c, products d
      9     where b.product_id = c.product_id
     10     and lower(b.project_name) = lower(c.project_name)
     11     and c.product_id = d.product_id
     12  ),
     13     final_base_data as
     14  (
     15     select
     16        b.product_id      PROD_ID,
     17        b.project_desc    PRODUCT,
     18        sum
     19        (
     20           case
     21              when b.fixed_date >= stuff.quarter_end_date or stuff.quarter_end_date is null
     22              then
     23                 b.fixed_count
     24              else
     25                 0
     26           end
     27        )  as FIXED
     28     from base_data b
     29     left outer join
     30     (
     31        select
     32           pr.product_id,
     33           qr.quarter_end_date
     34        from product_rating pr , quarters qr
     35        where pr.quarter_last_updated = qr.quarter_id
     36     )  stuff
     37     on (stuff.product_id = b.product_id)
     38     group by b.product_id, b.project_desc
     39  )
     40  select A.PRODUCT, A.TOTAL, B.FIXED, a.PROD_ID, round((b.FIXED/a.TOTAL) * 100,  2) percent
     41  from
     42  (
     43     select sum(a.total_count) TOTAL, a.product_id PROD_ID, d.project_desc PRODUCT
     44     from total_counts a, product_list c, products d
     45     where a.product_id = c.product_id
     46     and lower(a.project_name) = lower(c.project_name)
     47     and c.product_id = d.product_id
     48     group by a.product_id, d.project_desc
     49  ) A
     50  JOIN final_base_data B
     51  on A.PROD_ID = B.PROD_ID and A.PRODUCT = B.PRODUCT
     52  ;
    
    PRODUCT                                     TOTAL              FIXED            PROD_ID            PERCENT
    ------------------------------ ------------------ ------------------ ------------------ ------------------
    Prod 1                                       2000                  4                  1                 .2
    Prod 2                                       1000                 58                  2                5.8
    Prod 3                                        500                  3                  3                 .6
    
    3 rows selected.
    

    See you soon,.

Maybe you are looking for