1.6 LOV query invalid, was working in 1.5

The following LOV query was valid in 1.5:
select rd.name, rd.refdata_id from refdata rd, refdata_meta meta where meta.name = 'Title' and rd.refdata_meta_id = meta.refdata_meta_id and (:20_PATIENT_ID IS NOT NULL OR visible = 'Y') order by rank
This query is being flagged as invalid in 1.6. The problem appears to be the parenthetical OR clause, since taking it out passes validation. The error message is:
"LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query."
Seems to me that the validator is equating the existence of a left parenthesis with an inline query, which of course is incorrect as the above perfectly valid SQL demonstrates.
The query with the OR clause operates to populate the LOVs just fine in my existing app migrated from 1.5, so this is a maintenance and new app creation issue.
I can of course work around it by views as needed to support a simplified LOV query, but I would much rather just get the former level of functionality back. Any prospect of fixing what appears to me to be a bug in the LOV query validator for the 1.6 platform?
thanks,
susan weber

Susan,
In 1.6, we introduced LOV query validations, to help head off problems before runtime. Looks like in this case, the check has a bug. It's trying to parse your SQL as if it were a query in a region and it fails because of the item name you are using that begins with a numeric digit and is followed by non-numeric characters. Such a query fails to parse with DBMS_SQL.PARSE. But the query does work, as you know, in an LOV, where EXECUTE IMMEDIATE with a USING clause handles it okay.
So we have three bugs, the LOV query validation algorithm, the misleading validation failure message, and the bug that allows users to create and use items with names that are not valid Oracle identifiers. Thanks for pointing this out.
Your workaround is to use v('20_PATIENT_ID') instead of using bind variable notation.
Scott

Similar Messages

  • LOV Query Invalid

    Hello.
    I am uisng Apex 4.1 on Oracle 10.2.0.5 and Oracle App Server.
    Would someone please tell me why the following LOV query is causing the dreaded error:
    LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
    select d, r
    from
    select
    '(select)' as d,
    'javascript:void(0)' as r
    from dual
    union
    select
    initcap(INFO_NAME) as d,
    'javascript:popUp2(''' || INFO_LINK || ''', 1000, 800);' as r
    from INFO_LINKS
    order by 1Running this query in the SQL Commands section returns the result set without problem.
    Related to this, I've noticed that I am getting this same error for many similar LOV "complex" queries that involve things like UNIONs or sub-queries. In fact, when I bring up an already working LOV query in the LOV editor and then simply click the "OK" button without modifying the query, I get this same error. WHY?
    Thanks in advance for any help on this.
    Elie

    Hello Everyone.
    I just realized what my mistake is.
    Many of the individual lines in my LOV query are ending with a carriage-return character. And so, the following code line is literally concantonated with the previous line.
    Once I added one or more space characters to the end of each code line, Apex accepted the query without problem.
    Whew! That was tricky, indeed.
    And this is why many of my other already working queries suddenly caused the error when I clcik the OK button in the LOV editor. For some reason, bringing up these already existing, working queries stripped awawy any space characters from the very end of the code codes.
    I hope this helps others facing the same issue.
    Elie

  • Select list and subquery: "LOV query is invalid"

    Hi all,
    I want to create a select list with the following format:
    "name1 (count of another table)"
    "name2 (count of another table)"
    I've boiled it down to a simple query with a non-correlated subquery that works fine in SQL*Plus but not as an LOV:
    select table1.field1 || (select count(*) from table2) d,
    table1.field2 r
    from table1
    I get this (Apex 3.2.1):
    1 error has occurred
    * LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
    Even this doesn't work:
    select table1.field1 || (select 'a' from dual) d,
    table1.field2 r
    from table1
    I've tried it with an inline view, joining table1 to a select from table2 that returns the count, but I get the same result. Any ideas?
    Edited by: MalcA on Jan 22, 2010 12:14 PM

    I don't know, but the difference is that the count(*) code goes from the select clause to the from clause.
    Other times I had the same problem and always did it and it was the solution.

  • Invalid LOV query error

    I am trying to modify a query for LOV page item but get an Invalid LOV query error when trying to Apply Changes to my page(query however works in SQL*Plus)
    I am trying to change the date format of query result to MON YYYY.
    Original query that works:
    select distinct bill.BILLED_DATE display_value, bill.BILL_ID return_value
    from BILL;
    New Query that fails in APEX (but works in SQL*Plus)
    select distinct to_char(bill.BILLED_DATE, 'MON YYYY') display_value,
    bill.BILL_ID return_value from BILL;
    Anyone have any idea what I need to do to make this work?
    "1 error has occurred
    LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query"

    Strange, this lov does work and is no different than yours:
    select distinct to_char(sysdate,'MON YYYY') disp, 1 retval from dual
    What are the results from the query? Can there be something wrong with that?
    Regards Guido

  • Binding a variable to an LOV query, not working... Urgent!

    Hi,
    Based on a column value(which gets populated at runtime), in a table, the LOV query for another column in the same table, should be restricted with this value.
    1. My LOV is based on a VO.
    Lov query is
    SELECT ped.full_name as employee_name,
    ped.employee_number as employee_number
    FROM p_employee_details ped
    WHERE ped.value = 'Y' and ped.work in (:1, 'Both')
    2. For binding the variable, I have a method in VOImpl of the LOV.
    public void initQuery(String p_param)
    setWhereClauseParams(null);
    setWhereClauseParam(0,p_param);
    3. This method is called in the LOVAMImpl
    public void initializeVO(String p_param)
    LovVOImpl lovVO = (LovVOImpl)getLovVO1();
    lovVO.initQuery(p_param);
    4. In the CO for the LOV RN, the LOVAMimpl Method defined in step 3 is called.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule lov_am = (OAApplicationModule) pageContext.getApplicationModule(webBean);
    Dictionary lov_dict = pageContext.getLovCriteriaItems();
    String lov_criteria = (String) lov_dict.get("work");
    Serializable lov_params[] = {lov_criteria};
    lov_am.invokeMethod("initializeVO",lov_params);
    Here "work" is the column in the table whose value is needed for binding the lov query
    But i am still getting an error saying not all variables bound.:
    Developer Mode Exception : Lov Input should by default be the queryable criteria and Result.
    I don't know what else to do.
    Thanks in advance

    HI,
    Here the code giving on starting of the thread will work,only problem is lov mapping over here which was same as mine , u have to create one more lov mapping which will have criterial item same as the field on which lov is based.
    Thanks

  • LOV query is invalid, a display and a return value are needed

    hello - i am having this issue and can't get around this when creating a popup LOV based on sql.
    below is LOV query. as you see the view has only two columns. I tried various ways by giving alias to columns in query but nothing works. What did I miss here?
    select description,inventory_item_id from xx_apex_inv_v
    1 error has occurred
    LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.

    Did you try it like this?
    select description d, inventory_item_id v from xx_apex_inv_v

  • LOV Query is "invalid" all of a sudden...

    The query below was written a while back (I've been through several APEX upgrades since then). I recently went in to the LOV Definition to make some changes and found that, no matter what I do, I get the error:
    "LOV query is invalid, a display and a return value are needed, the column names need to be different..."
    This is even true if I make no changes to the Query but try to "Apply Changes". I'm guessing that an upgrade someplace along the line is causing this.
    Any ideas on how to make this query valid once again?
    (APEX 3.1)
    Thanks!
    Alex
    SELECT 'ES Value of ' || TO_CHAR(round(ve_value,-2),'$99,999,999') d, 'ES' c
    FROM QUERY_MAIN qm
    WHERE query_id = nv('P310_QUERY_ID')
    AND subject_propid = nv('P309_BLS_PROPID')
    AND nvl(ve_value,0) > 0
    UNION
    SELECT 'PV Value of ' || TO_CHAR(round(Bluelime_Common.get_perfect_value(nv('P309_BLS_PROPID'), NULL, NULL, TO_DATE(:p0_base_date, 'MM/DD/YYYY')),-2),'$99,999,999') d, 'PV'
    FROM dual
    where TO_DATE(:p0_base_date, 'MM/DD/YYYY') != trunc(sysdate)
    UNION
    SELECT 'PV Value of ' || TO_CHAR(round(Bluelime_Common.get_perfect_value(nv('P309_BLS_PROPID')),-2),'$99,999,999') d, 'PV'
    FROM dual
    where TO_DATE(:p0_base_date, 'MM/DD/YYYY') = trunc(sysdate)
    or :p0_base_date is null

    Have you tried this:
    SELECT disp_val d, ret_val r
      FROM (SELECT    'ES Value of '
                   || TO_CHAR (ROUND (ve_value, -2), '$99,999,999') disp_val,
                   'ES' ret_val
              FROM query_main qm
             WHERE query_id = nv ('P310_QUERY_ID')
               AND subject_propid = nv ('P309_BLS_PROPID')
               AND NVL (ve_value, 0) > 0
            UNION
            SELECT    'PV Value of '
                   || TO_CHAR
                         (ROUND
                             (bluelime_common.get_perfect_value
                                                           (nv ('P309_BLS_PROPID'),
                                                            NULL,
                                                            NULL,
                                                            TO_DATE
                                                                   (:p0_base_date,
                                                                    'MM/DD/YYYY'
                              -2
                          '$99,999,999'
                         ) disp_val,
                   'PV' ret_val
              FROM DUAL
             WHERE TO_DATE (:p0_base_date, 'MM/DD/YYYY') != TRUNC (SYSDATE)
            UNION
            SELECT    'PV Value of '
                   || TO_CHAR
                         (ROUND
                             (bluelime_common.get_perfect_value
                                                            (nv ('P309_BLS_PROPID')
                              -2
                          '$99,999,999'
                         ) disp_val,
                   'PV' ret_val
              FROM DUAL
             WHERE TO_DATE (:p0_base_date, 'MM/DD/YYYY') = TRUNC (SYSDATE)
                OR :p0_base_date IS NULL)Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • I am trying to install Photoshop Elements on my new Windows 8 computer (I recently upgraded my windows 7 computer where Photoshop was working fine on before).  It says the serial number is invalid.  Do older versionsnot work on Windows8, or do I need to u

    I am trying to install Photoshop Elements on my new Windows 8 computer (I recently upgraded my windows 7 computer where Photoshop was working fine on before).  It says the serial number is invalid.  Do older versionsnot work on Windows8, or do I need to uninstall it from my old computer first?

    You are allowed to have two activated installations.  If you happened to have one on this Windows 8 machine before, it is possible that the activation used for it was never deactivated (did you deactivate it before you upgraded Windows?).  Talk to Adobe support thru chat.  They might be able to resolve this with you:
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • Itunes was working fine. Tries to install latest upgrade and get error message about an invalid character in the path "Program Files (x86)". PC, Win7, nothing else appears to be having same issue.

    Itunes was working fine. Tried to install latest upgrade and get error message about an invalid character in the path "Program Files (x86)". PC, Win7, nothing else appears to be having same issue. Program still works, simply cannor upgrade.

    Thanks b noir,
    I tried this solution without success. After FixIt ran and didn't find a problem, either in looking for issues with "software upgrade" or "iTunes" it kindly offered to help me uninstall iTunes. I had thought of this as a possibilty but it seems to me that if you do that you lose a lot of "non-native-to-Apple" information you might have entered. I did this once and recovery was painfull. Is there a way to uninstall iTunes without losing all of that sort of thing? Any help would be appreciated.

  • When I try and download an app it is saying my billing security code is invalid, but it was working fine

    When I go into  download an app in the appstore it is saying my billing security code is invalid,It was working fine before.

    Same thing happend here.  Yesterday I called and chatted with a lady who told me right away that they are having issues with people validating their credit cards.  She told me to contact support by email, which I did twice, they replied with the following:
    1. Contact your bank or credit card company and ask to speak with the fraud/security department.
    2. Tell the representative that your security code is being rejected. Ask them to review your account to see what might be preventing you from using the card to purchase from the iTunes Store. Ensure that they thoroughly review your account until they locate and resolve what is causing the issue.
    3. The bank or credit card company will need to remove any holds on your account.  The bank or credit card company could also bypass the authorization process.
    I tested my card with another trusted service who asked to verify with the security code and it worked fine.
    I guess at this point you could call your bank (just in case) or just wait.

  • LOV Query is Invalid

    When testing the following in SQL Commands it runs.
    select DISTINCT LNAME, FNAME as display_value, FNAME||' '|| LNAME as return_value
    from PERSONNEL_SSN
    where ACTIVE = 'Y'
    order by 1
    However, I get an LOV Query is Invalid error when trying to use it in Source: Lists of Values Query.
    I'm new to Apex and am learning as I go.
    Any suggestions would help.
    Thanks!

    As Marc advised, you are returning an additional field, although I suspect you are maybe attempting to display "Last Name, First Name" - if so, you would do this:
      select distinct lname||', '||fname display_value
           ,fname||' '||lname return_value
      from personnel_ssn
    where active = 'Y'
        order by 1Having said that, you might want to re-visit your data model - you might come unstuck if new employee "Michael R. O'Donnell Esq." joins the organisation on the first day of your holiday... :-)
    Edited by: Joel_C on 16-Nov-2011 15:42

  • LOV query is invalid, a display and a return value are needed, the column n

    Hello,
    I used to have no trouble at all creating dynamic LOV but from today I' am alway getting the error mentioned above.
    This is the LOV query
    select nm,zon_id from scr_zones_mv@d29ut
    I tried to created a view of the referenced table, I'm able to select from this view in query builder but it gives the same error.
    What is going wrong?
    Erwin

    Sorry guys,
    I already found the problem.
    thanks
    Erwin

  • LOV Query with decode

    Hi All,
    I have following Query for my LOV.
    SELECT DECODE (PTY_COMP_FLG, 1, PTY_COMP_E_NAME,
    PTY_E_FIRST_NAME || ' ' || PTY_E_LAST_NAME)
    PTY_NAME,
    PTY_NUM
    FROM RE_PARTY
    WHERE PTY_TYPE = 1
    ORDER BY 1
    I get the following error.
    LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
    Please help me out of this.
    Thanks in advance.
    Regards
    Arif
    Message was edited by:
    Arif

    Check the query once again, as it should work.
    Ex:
    SELECT DECODE (EMPNO,2839,ENAME,JOB||' '||'NO MANAGER') Display_Value,
    EMPNO Return_Value
    FROM EMP
    WHERE JOB <> 'MANAGER'
    ORDER BY 1
    Its just a query tried in LOV and it is working.
    Regards
    Ckengs

  • CFGRID, was working in CF8 won't display results in CF11

    Hi
    I recently upgraded a client from CF 8 to CF 11.
    In the code is a CFGRID which was working in CF8 but now in CF11 the grid displays but no data appears (the grid is simply empty).
    With debugging enabled the Coldfusion Ajax Logger is reporting the following error:
    Uncaught SyntaxError: Unexpected identifier (http://hiddenServer.com/index.cfm?action=job.manageJobOperations&jobId=2395&cfdebug, line 104)
    Line 104 is the "</cfgrid>" tag.
    Here is cfgrid code, complete with it's bound cfselect statement immediately before it:
    <cfselect name="primarysupplier" query="getconcretecompanies" display="name" value="id" required="yes"  />
    <cfgrid name="mixdesigns" format="html" bind="cfc:controller.Controller.getMixDesign({primarysupplier},{cfgridpage},{cfgridpagesize},{c fgridsortcolumn},{cfgridsortdirection},{primaryconcrete:jobid})" bindonload="yes" height="400" selectmode="row" sort="yes" selectonload="false">
                                <cfgridcolumn name="id" display="no" />
                                    <cfgridcolumn name="selectcode" select="yes" display="yes" header="Select" width="40" />
                                    <cfgridcolumn name="shortcompanyname" display="yes" header="Supplier" width="75" select="no" />
                                    <cfgridcolumn name="mixnumber" display="yes" header="Mix Number" width="75" select="no" />
                                    <cfgridcolumn name="psistrength" display="yes" header="PSI" width="45" select="no" />
                                    <cfgridcolumn name="cubicyardprice" display="yes" header="Price" width="50" select="no" />
                                    <cfgridcolumn name="description" display="yes" header="Description" width="180" select="no" />
                                </cfgrid>
    I've dumped the query that populates the cfselect and there are no empty rows.
    The console at the bottom of Chrome simply reports the same error, "Uncaught syntaxError. Unexpected identifier".
    Has anyone else encountered this issue? If nothing else I'd love to learn how to debug this error, it seems as if there is some extra data being fed to the cfgrid but I can't seem to trap it....
    Anyone?
    Thanks in advance for your help,
    Rich

    Anit
    Could you please clarify?
    In the Adobe bug report for this issue (Bug#3759630 - CFGRID with BIND to CFC failed for an incorrect JavaScript)
    ... it mentions
    Build
    Found In Build
    CF11_Final
    Fixed In Build
    289972
    Doesn't that mean if the Coldfusion version that I'm running is Coldfusion version 11,0,0,289974, then my build would already have the fix rolled up in it? Or am I not reading the versioning correctly?
    Thanks,
    Rich

  • Seeded LOV in OA Page works on internal server, does not in external server

    I am using the appraisal creation page '/oracle/apps/per/selfservice/appraisals/webui/MASetupDetailsPG'. Here we have a LOV that lists the appraisal template.
    The LOV returns records when Pressing 'Go' from the LOV Search page while accessing from internal server.
    However, while performing the same steps from external server, on clicking 'Go' , we get 'No Search Conducted'. ideally , we'll expect the records to come up (or) no results match the chosen criteria. However in this case, it simply gives 'No Search Conducted'.
    The 'About this Page' on LOV Page does not show the VO/AM details from external server.
    I have checked the following:
    1. Class path is same while accessing from both external and internal server
    2. Page personalisations are fairly starightforward, just prompts,instruction text changes etc
    3. There is no VO/AM customisation. This was done by checking jdr_utils from apps. i suppose this is just application-wide and cannot be checked at server level. pls validate my statement.
    4. I have tried 'Diagnostics' using 'About this Page'. It works internally and gives the LOV query with bind parameters. However when I try to do 'Diagnostics'-->Show log on Screen, the screen just hangs before i can see the 'log Level' list on the screen. So I am unable to take trace even from external server.
    5. Few other LOVs work from external server. But this one does not.
    What could be the cause and how do i debug further?
    Any help is appreciated.
    Thanks,
    LN

    As far as I know, if he does what you suggest he won't be able to resolve the "main" domainname.
    The internal DNS will think it is the SOA for the "whole" domainname, including subdomain or not, and woun't ask any other DNS. So he needs to add all public IPs/names in his DNS if using the same domainname.
    Delegation of a subdomain, this requires both DNS using public IPs:
    http://www.zytrax.com/books/dns/ch9/delegate.html
    I guess this is "wishful thinking":
    IF he (most likely woun't happen) could/be allowed to do zone transfers from a DNS hosting the "main" domainname and run that zone as a slave/secondary on his internal DNS it should work. It wouldn't be ugly if it can be done without adding his internal DNS IP as a NS record. I don't know about notifying the slave about changes to the main domain then though.
    If running your own public DNS to separate between public and internal only/private IP lookups depending on what IP the request is coming from:
    http://www.zytrax.com/books/dns/ch7/acl.html

Maybe you are looking for

  • How do I convert old imovie .mov files to files I can use in imovie 9.0.9?

    How can I convert files from archived movies (.mov files) made on iMovie so I can edit them on the current (9.0.9) version of iMoview that I have? My Mac is version 10.10.2.

  • Help!  I am exhausted.

    I have been trying to make the new version of Itunes work for the last week. I do not know what else to do. I have deleted Itunes, tried to load the quick time stand alone, work with the quick time permission keys, and disabled Norton. I have followe

  • Zip Utils (unzip problem )

    Hi, I have a problem with the ZIP, so i an array of bytes ziped in my database without problem,but after when i try to extract this information i must to unziped it , the problem is that the unzip method replace the char "�" by another char that caus

  • Windows 8, Error: "Can't connect to this network"

    I have wracked my brain, my colleague's brains, and used my googlefu to no avail. I have a Win8 basic (cheapest OS) HP tablet 1000G2 that I am having troubles with. I have a network that requires WPA2-Enterprise with PEAP. It will not connect to this

  • Why do arrow heads change ends when using the pen tool?

    1. I create a horizontal line 2. I change it to a right ended arrow head selected from my own graphic styles 3. I then want to extend the left side ( non arrow end) with the pen tool 4. I click the non arrow end to extend the line in a vertical direc