Select the list and the subquery: "motion LOV is invalid."

Hi all

I want to create a list with the following format:

'name1 (County of another table).
"Name2 (County of another table).
...

I have it boiled down to a simple query with a non-correlated subquery that works fine in SQL * more, but not like a LOV:

Select table1.champ1. (select count (*) from table2) d.
Table1.champ2 r
FROM table1

I get this (Apex 3.2.1):

1 error has occurred
* 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.

Even if it does not work:

Select table1.champ1. (select 'a' out of two) d.
Table1.champ2 r
FROM table1

I tried it with an inline view, joining table1 a statement select from table2 which returns the number, but I get the same result. Any ideas?

Published by: MalcA on January 22, 2010 12:14

Try this.

Select D,
R
from (select TABLE1. FIELD1 | (select 'a' out of TWO) D,
TABLE1. FIELD2 R
from TABLE1)

Tags: Database

Similar Questions

  • Retrieve selected the value of LOV

    Hi friends,

    I have a query on the value selected LOV.

    I have two fields in my form called Dimension and indicator. We have the table associated with these two fields, DIMENSION_TABLE and INDICATOR_TABLE.

    The field two Dimension and indicator are filling the table DIMENSION_TABLE and INDICATOR_TABLE lov. Assume that the user has selected 'ABC' as a value

    dimension field LOV and 'XYZ' indicator field lov. Before submitting this user page is by clicking the search button in the page of the form. Then click on the button Search

    a pop up window should open that list down the records of database on the basis of LOV of Dimension selected and indicator which is submitted allread. ex: id-1 indicator of Dimension-ABC-XYZ, id-2 size-ABC indicator-XYZ, id-3 Dimension-ABC indicator-XYZ. Like this.

    Need help on this. Thanks in advance

    Concerning

    You want the whole 9 yards after all.

    Your Page 8 application should look like

    select dimension_table.dimension, dimension_table.indicator
    from dimension_table
    where dimension like nvl(:P8_DIMENSION,'%')
    and indicator like nvl(:P8_INDICATOR,'%')
    

    In the calling Page (say 1) that has the lists to select, on the second lists (supposed P1_INDICATOR) add the following line to the attribute of the element

    onchange="setVal();"
    

    In the call header pages updated HTML code below

    
    

    Now, create an OnDemand application process and insert the following code into it

    declare
      p_x01  varchar2(1000) := apex_application.g_x01;
      p_x02  varchar2(1000) := apex_application.g_x02;
    begin
      :P8_DIMENSION := p_x01;
      :P8_INDICATOR := p_x02;
      htp.prn('');
    end;
    

    You may experience problems of closure of the modal popup. For soolution search this forum.

    Kind regards

  • create popup LOV values depends on the return values of select tabular list

    Hello

    My requirement is

    In a table, first column is selection list and second column is LOV Popup.

    I want to create if select user from the selection list value 'A' then displays the popup LOV values.

    If the user selects 'B' values in the select list and then display nulls within the popup LOV.

    Kind regards

    Arianne.

    Hi ujwala1234,

    ujwala1234 wrote:

    In a table, first column is selection list and second column is LOV Popup.

    I want to create if select user from the selection list value 'A' then displays the popup LOV values.

    If the user selects 'B' values in the select list and then display nulls within the popup LOV.

    Use the Popup LOV cascading given by Jari wool in this blog: Blog APEX of Jari: pop-up list of the 'waterfall' Article on slot form of

    Write your Popup LOV query such as if, 'A' is selected it returns other values it will return null value.

    Kind regards

    Kiran

  • Set the default value to select the list

    Hello
    I have a question about the page, which is a selection list
    And I have a LOV associated with this issue, which is a database query.

    How one of the values of this LOV to a default value of this selection?
    I need this value that appears first, instead of a Null value.

    Thank you!

    That's right - use the default value of your definition of the element box.
    Take a look at this post:
    Re: previous option selected as default

    Maybe you will find it useful...

  • copy the select value in the textfield of LOV, and allow the user to modify

    Hello
    I have a datablock with 20 records and each record has a comment (say field_comments) fields. I would like to allow the user to choose LOV populated predefined comments (say lov_comments) and add a few additional comments after they choose the value of LOV.

    I created a LOV and added the return type 'field_comments' in column mapping properties. When the user clicks a button, LOV opens. They choose the value of the LOV and the value goes to the field 'field_comment '. The problem with this approach, the user cannot add their comments after selecting in LOV.

    I tried this too much. I created another area of non-visible text (i.e. fake). In the LOV, I added "dummy" field as returntype. In the dummy field, I created the trigger 'After the CHANGE', which basically says: block. field_comments =: block. Mannequin.

    But, the user must click another field to display the value selected from the LOV. The values of the 'field_comments' is not being updated as soon as the user click on the 'OK' button in the LOV.

    I'd appreciate if someone could give me feedback and help to solve my problem. Thank you for your help.

    I thank.

    Well, I tried exactly what you posted and it allowed me to SELECT from LOV, then CHANGE/ADD new text in front of returned value in the field. He recorded in the database and questioned without any problem.

    Your article is allowed to INSERT/update? If this isn't the case, then set yes "Update/Insert allowed" and attach your LOV to the element and set "post to list" No.

    You can also see if you have any validation done on WHEN-VALIDATE-ITEM trigger or after CHANGE which will fail because you change LOV populated values.

    I hope that helps!

  • How can I select the files in a folder with the help of a list with the files you want and after that rename only the files using another list with desired new names?

    How can I select the files in a folder with the help of a list with the files you want and after that rename only the files using another list with desired new names?

    I have only:
    D: / images (where are necessary + not need files)
    -a list with only the necessary files
    -a list with new names for the files needed
    Thank you.

    Hi Pustiu,

    Thanks for posting in the Microsoft Community.

    You want to know how to select the files in a folder using a list with the files you want and after that rename only the files using another list with desired new names.

    I would have you post your query in the TechNet forums because it caters to an audience of it professionals.

    Your query will be better addressed there.

    Check out the link-

    http://social.technet.Microsoft.com/forums/en-us/w7itprogeneral/threads

    We know if you need help. We will be happy to help you. We, at tender Microsoft to excellence.

    Thank you.

  • Select the text and code lists

    I have a tabular layout with a field called KPI_ID, which is a number in my database table.  I want the user to be able to use a selection list that shows the descriptive text for this indicator number of KEY performance choose what KPI_ID they want.

    KPI_ID is defined as type "select list".  The type of list of values is "SQL query", and it is the query:

    Select kpi_desc,

    kpi_id

    KPI

    where the team =: P10_TEAM

    Everything seems OK, but when the user selects a KPI and save, the new value is not saved.  I used the debugger to determine that the KPI_ID is set to «»

    What I am doing wrong?

    APEX version: 5.0.2.00.07

    Database: Oracle Database 11 g Express Edition Release 11.2.0.2.0 - 64 bit Production


    Host: MaxApex (dedicated DB)Browser: Google Chrome Version 47.0.2526.106 m
    Themes: "Scarlet - 21" and ""Topaz"- 4"»Character of favorite Gilligan's Island: Mary Ann

    I found my problem.  In the process of "Updating the lines" I had defined KPI_ID as a "secondary key column.  That's why he let me not change this value.  I removed KPI_ID as a "secondary key column' and now it works well.

    As Roseanne Roseannadanna used to saying: 'never mind '.

  • I use a horizontal menu of the widgets library. All right, except that I would have any of the drop-down list list stay open after selecting the top item... and remain open after the selection of a menu under item - so that the viewer knows where they are

    I use a horizontal menu of the widgets library. All right, except that I wish I had the all menu drop-down list stay open when you have selected the top element. And when you have selected a menu SUP item - so that the viewer knows where they are in the navigation. Who is? Thank you!

    Hello

    There is no native function to Muse to achieve this goal. However, if you host your site on Business Catalyst, you can take advantage of the functionality of breadcrumbs. He won't let the open drop-down list stay, but it will show customers on what page they are and that he can see that they have followed to reach the page. For more information, please visit the following link http://helpx.adobe.com/business-catalyst/partner/add-breadcrumbs.html

    Kind regards

    Aish

  • Select the list AND entry of hand

    I have a situation where I need to use a list selection on the form and the traction of a lookup table. The tricky part is that I also need to be able to allow the user to enter text in addition to the collection in the drop-down list. Needless to say that the user has entered by hand at the table of correspondence. While it simplifies, but I need for the user to choose from a list and a hand enter if necessary.

    Someone else ran into this requirement and found a way to deal with it?

    Thank you
    John

    Hi John,.

    If you use apex 4.0 or later, you can use [url http://www.apex-plugin.com/oracle-apex-plugins/odtug-competition/combobox_208.html] this plug-in.

    Kind regards
    Hari

  • drop-down list and using the selected command to select the fill element

    Hi I have a menu drop down being populated by a mysql table, the drop-down list works fine with reading and updating, but I wish I had the mysql stored id to select from the drop-down list on the edit page.

    I have the following code, but I can't point to be selected?  I think it is because I have not coded if statement properly.

    < select name = "stand_id" >
    <? PHP
    $stand_set = getall_stands();
    While ($stands = mysql_fetch_array ($stand_set)) {? >}
    <? PHP if (isset($_POST['stand_id']) == $url_show ['stand_id']) echo ' selected = "selected".
    « ' ; ? >
    "< option value =" <? PHP echo $stands ["stand_id"];? ' > '.

    > <? PHP echo $stands ["stand_descrip"];? > < / option >
    <? PHP}? > < / select >

    Any help would be really appreciated

    Horsemad Gilly wrote:

    the argument would be compared with $url_show ["stand_id"], ["stand_id"] $stands and then selecting the $stands ["stand_id"]

    selected = "selected".

  • How can I select more than one bookmark at a time so that I can open and then several bookmarks - without the aggravation of back to the list and selecting and opening each one.

    My dozens of bookmarks, I often want to open 5 or 6 of them at the same time - maybe a couple of weather reports, a couple of radio stations, a couple of other Web sites. But I see no way to do this without laboriously find a bookmark, select it, opening the site, then return to the Favorites, find the second bookmark, select it, open the site and so on. There is probably a way for me to select several independent bookmarks, then open them at the same time. Thanks a lot for your help. Don

    Oh I see, when I read your question, my understanding is that you have Web sites that you are opening regularly you would like to open all at once. This is why I have proposed to create a folder with these specific bookmarks.

    However, your clarification, it seems that you want to open Web sites randomly here and there. So, essentially, you want to SELECT favorite sites and then open them at the same time.

    There is a way to do it. Access your bookmarks by clicking on the menu button drop-down orange Firefox (upper-left). It is:

    • Go to \Firefox\Bookmarks\Show all bookmarks;
    • Click on "Bookmarks Menu" (in the sidebar);
    • Use the CTRL key to select your favorite Web sites.
    • Right click and choose "all open tabs.

    It's always a bit laborious, but it's the easiest way, I could find, especially if you want to open several tabs at the same time.

  • Choose the value of the selection list and value come into text without the refres field

    Hi friends


    I want to like this link

    [http://htmldb.oracle.com/pls/otn/f?p=33867:1:3985649502490025:NO]

    When I select the emp name then use should come without updating to the text field.
    should what code I apply for this...



    How can I do this...


    Thank you

    Good JS code below

    
    

    Also change OnDemand as follows

    htp.p(ad_rs ||':'||t_in);
    -- exception handling added
    exception
      when others then htp.prn(sqlerrm);
    end;
    

    Concerning

    Published by: Dominique on August 17, 2010 18:01

  • Select the list

    using an element from the selection list with a sql statement to the LOV.

    I want to display (for example using emp) ename (employee name), but back to the page-item the empno.

    Select ename, empno from emp order by 1 r d

    what I see on the drop-down list is the ename and fills the page element is also the not the empno ename

    This is the expected behavior (if so what is the second entry in the selection list for?)?

    Eben

    ebenwalker wrote:

    the behavior we are trying to achieve is that the user selects the name but the page fills up with the empno and the user sees the empno.  Perhaps no one expected behavior?   (don't have not implemented those fields in the table)

    I think that I misunderstood what follows in the original post:

    what I see on the drop-down list is the ename and fills the page element is also the not the empno ename

    I took this means that the name was displayed in the select list and has been stored in the status column value / session. This clearly shows not the case in the HTML code generated for the control above.

    You seem to want the control to display the selected option value, but present the content of the list option when activated. In this case, Yes, the behavior that you expect is certainly not provided by standard selection list control (if I am now actually understand this and expect this selection and display behavior to occur in a single command).

    The standard command with behavior more closely matches the one described is a Popup LOV with field of entries of configuration Enterable, Show and store return value, as in This example added to your application.

  • Popup LOV selected the value not in session state

    I have a pop LOV element on a page in my application.  Once the item has been selected in the list presented, I would like to use as part of a select statement.  Select statement failed.  It turns out that the value I want the popup THAT LOV is not being saved in session state, so of course the select statement fails.  I determine this by clicking on the session menu item in the developer bar - the item itself presents itself, but the value is empty.

    What would cause a popup LOV value choice not finish by in session state, and how do I make sure he gets there?

    Thank you!

    If you need the value in a SQL report, you can just set "Elements of Page to submit" in your report to your LOV element definition. Otherwise, create a dynamic fire action when your LOV is changed with a set of pl/sql null process action; then set Page elements to send to your LOV element.

    Alternatively you could do it manually with your own function/Manager javascript using the '$s' Apex API by creating a dynamic action that JavaScript is triggered then the loading of the page:

    $("#PXX_YOUR_LOV").on('change',function(){
      var getValue=$(this).val();
      $s('PXX_YOUR_LOV', getValue);
      });
    

    Changing the value in LOV only updates the HTML code, the element must be submitted to the server so that the value that will be put in session state. The gurus can explain more, but the above methods are what I use depending on the situation.

    see you soon,

    John

  • Select the list, joins

    HY!

    I have a list of selection with a query like this:

    select A._NAME as display_value,A._ID as return_value
      from A;
    

    Works fine of course.

    But I want to make this more dynamic list.

    I need to perform a join with another table, but it does not accept my request.

    It is not possible:

    select A._NAME as display_value, A._ID as return_value, A.AnotherIDWichINeedForAJoin
      from A;
    

    I get this error:

    Impossible to analyze the query SQL LOV!

    ORA-00904: "A". "" AnotherIDWichINeedForAJoin ": invalid identifier

    Is it not possible to make a join in a query select list?

    Is there another way to make a selection list that can manage the entry of a session (for example with a join) variable?

    Thanks for the help,

    ILB.

    It is possible to do a join, Yes, but in a query select list, you can have two values, a display and a return value, you have three, which will give an error. Always write and test your query in SQL or SQL Workshop first developer and make sure it works it before using it in the APEX, so you are sure that your request is correct.

Maybe you are looking for

  • How can I transfer a call facetime for my macbook

    If I answer an incoming call on my Macbook Pro with FaceTme iPhone I can retrieve the call on my iPhone by selecting the speaker on my phone icon. My question is once I have done this how can I send the call to my Macbook Pro?

  • Error-1967362041, DSC module, read the historical traces

    Hello. I'm reading some historical traces, but I get error-1967362041 and the message: HIST_ReadNumericTraceCORE.VI, \\hostname\library\Variable: IAK_SHARED: (Hex 0x8ABC7007) out of reach. This happens when using VI server to run my remote applicatio

  • Boot cant after Vista upgrade

    I tried to move from XP to Vista on a DELL computer.  XP was loaded by a "so-called experts" for my father, but never worked properly (not convinced it is a true copy).  Vista is a true copy.  seemed to load ok, I walked into the validation code, rea

  • E-mails of blackBerry Smartphones will not erase

    When I delete an email the text of the email disappears, but the message header is given a star and the header remains - and I can't delete the star either. Even when email is deleted in the online email account, he'll be the BB. Any ideas? Thank you

  • Disk not configured VM after Exchange hard drive Slots / berries

    Hi - I have 5.5 ESXi configured HP DL380 G6 server and three independent logical drives.  I had exchanged a HDD in slot 1 with slot 3 to do a test, but then he returned to original slots.In the ESXi VMware client, I see the detected hard drives but n