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

Similar Messages

  • 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

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

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

  • 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

  • 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

  • Adding a LOV MAP in a Page resulting page (invalid name space error) error

    Hi,
    I am trying to add a new LOV to a region in one of the oracle product self service pages.
    I am getting the LOV region displayed, but the moment I add lov mappings I am gettting the invalid name space error.
    Your help on this is highly appreciated. For your reference I am attaching the error below.
    ElementData.java:103) at oracle.adf.mds.internal.Cache.cacheElement(Cache.java:645) at oracle.adf.mds.internal.BaseCache.create(BaseCache.java:157) at oracle.adf.mds.internal.parse.ElementParser.startElement(ElementParser.java:222) at oracle.cabo.share.xml.TreeBuilder$Handler.startElement(Unknown Source) at oracle.cabo.share.xml.ParserAdapter.startElement(Unknown Source) at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:167) at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1182) at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301) at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149) at oracle.cabo.share.xml.ParserAdapter.parse(Unknown Source) at oracle.cabo.share.xml.TreeBuilder.parse(Unknown Source) at oracle.cabo.share.xml.TreeBuilder.parse(Unknown Source) at oracle.adf.mds.internal.parse.ParserUtils.createNode(ParserUtils.java:283) at oracle.adf.mds.internal.parse.ParserUtils.createNode(ParserUtils.java:115) at oracle.adf.mds.adapters.DBAdapter.getElementData(DBAdapter.java:324) at oracle.adf.mds.internal.MetadataManagerBase.findElement(MetadataManagerBase.java:1237) at oracle.adf.mds.MElement.findElement(MElement.java:97) at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(JRAD2AKMapper.java:493) at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(OAWebBeanFactoryImpl.java:3783) at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3460) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:988) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418) at oa_html._OA._jspService(_OA.java:88) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119) at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417) at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267) at oracle.jsp.JspServlet.internalService(JspServlet.java:186) at oracle.jsp.JspServlet.service(JspServlet.java:156) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456) at org.apache.jserv.JServConnection.run(JServConnection.java:294) at java.lang.Thread.run(Thread.java:534) oracle.adf.mds.exception.MDSRuntimeException: Invalid namespace: The namespace "null" has not been registered with the MetadataManager at oracle.adf.mds.internal.MetadataManagerBase.getElementDef(MetadataManagerBase.java:330) at oracle.adf.mds.internal.ElementData.(ElementData.java:103) at oracle.adf.mds.internal.Cache.cacheElement(Cache.java:645) at oracle.adf.mds.internal.BaseCache.create(BaseCache.java:157) at oracle.adf.mds.internal.parse.ElementParser.startElement(ElementParser.java:222) at oracle.cabo.share.xml.TreeBuilder$Handler.startElement(Unknown Source) at oracle.cabo.share.xml.ParserAdapter.startElement(Unknown Source) at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:167) at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1182) at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301) at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149) at oracle.cabo.share.xml.ParserAdapter.parse(Unknown Source) at oracle.cabo.share.xml.TreeBuilder.parse(Unknown Source) at oracle.cabo.share.xml.TreeBuilder.parse(Unknown Source) at oracle.adf.mds.internal.parse.ParserUtils.createNode(ParserUtils.java:283) at oracle.adf.mds.internal.parse.ParserUtils.createNode(ParserUtils.java:115) at oracle.adf.mds.adapters.DBAdapter.getElementData(DBAdapter.java:324) at oracle.adf.mds.internal.MetadataManagerBase.findElement(MetadataManagerBase.java:1237) at oracle.adf.mds.MElement.findElement(MElement.java:97) at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(JRAD2AKMapper.java:493) at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(OAWebBeanFactoryImpl.java:3783) at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3460) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:988) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418) at oa_html._OA._jspService(_OA.java:88) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119) at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417) at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267) at oracle.jsp.JspServlet.internalService(JspServlet.java:186) at oracle.jsp.JspServlet.service(JspServlet.java:156) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456) at org.apache.jserv.JServConnection.run(JServConnection.java:294) at java.lang.Thread.run(Thread.java:534) ">
    oracle.apps.fnd.framework.OAException: No data found for region (/oracle/apps/gl/controls/webui/ControlAssociationsPG).
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(JRAD2AKMapper.java:527)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(OAWebBeanFactoryImpl.java:3783)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3460)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:988)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at _oa__html._OA._jspService(_OA.java:88)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    oracle.adf.mds.exception.MDSRuntimeException: Invalid namespace: The namespace "null" has not been registered with the MetadataManager
         at oracle.adf.mds.internal.MetadataManagerBase.getElementDef(MetadataManagerBase.java:330)
         at oracle.adf.mds.internal.ElementData.<init>(ElementData.java:103)
         at oracle.adf.mds.internal.Cache.cacheElement(Cache.java:645)
         at oracle.adf.mds.internal.BaseCache.create(BaseCache.java:157)
         at oracle.adf.mds.internal.parse.ElementParser.startElement(ElementParser.java:222)
         at oracle.cabo.share.xml.TreeBuilder$Handler.startElement(Unknown Source)
         at oracle.cabo.share.xml.ParserAdapter.startElement(Unknown Source)
         at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:167)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1182)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
         at oracle.cabo.share.xml.ParserAdapter.parse(Unknown Source)
         at oracle.cabo.share.xml.TreeBuilder.parse(Unknown Source)
         at oracle.cabo.share.xml.TreeBuilder.parse(Unknown Source)
         at oracle.adf.mds.internal.parse.ParserUtils.createNode(ParserUtils.java:283)
         at oracle.adf.mds.internal.parse.ParserUtils.createNode(ParserUtils.java:115)
         at oracle.adf.mds.adapters.DBAdapter.getElementData(DBAdapter.java:324)
         at oracle.adf.mds.internal.MetadataManagerBase.findElement(MetadataManagerBase.java:1237)
         at oracle.adf.mds.MElement.findElement(MElement.java:97)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(JRAD2AKMapper.java:493)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(OAWebBeanFactoryImpl.java:3783)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3460)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:988)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at _oa__html._OA._jspService(_OA.java:88)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    oracle.adf.mds.exception.MDSRuntimeException: Invalid namespace: The namespace "null" has not been registered with the MetadataManager
         at oracle.adf.mds.internal.MetadataManagerBase.getElementDef(MetadataManagerBase.java:330)
         at oracle.adf.mds.internal.ElementData.<init>(ElementData.java:103)
         at oracle.adf.mds.internal.Cache.cacheElement(Cache.java:645)
         at oracle.adf.mds.internal.BaseCache.create(BaseCache.java:157)
         at oracle.adf.mds.internal.parse.ElementParser.startElement(ElementParser.java:222)
         at oracle.cabo.share.xml.TreeBuilder$Handler.startElement(Unknown Source)
         at oracle.cabo.share.xml.ParserAdapter.startElement(Unknown Source)
         at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:167)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1182)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
         at oracle.cabo.share.xml.ParserAdapter.parse(Unknown Source)
         at oracle.cabo.share.xml.TreeBuilder.parse(Unknown Source)
         at oracle.cabo.share.xml.TreeBuilder.parse(Unknown Source)
         at oracle.adf.mds.internal.parse.ParserUtils.createNode(ParserUtils.java:283)
         at oracle.adf.mds.internal.parse.ParserUtils.createNode(ParserUtils.java:115)
         at oracle.adf.mds.adapters.DBAdapter.getElementData(DBAdapter.java:324)
         at oracle.adf.mds.internal.MetadataManagerBase.findElement(MetadataManagerBase.java:1237)
         at oracle.adf.mds.MElement.findElement(MElement.java:97)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(JRAD2AKMapper.java:493)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(OAWebBeanFactoryImpl.java:3783)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3460)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:988)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at _oa__html._OA._jspService(_OA.java:88)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)

    Which version are you using? I believe that adding regions started from CU2. Confirm this.
    Did you set the profle FND:OA Enable Defaults? This may not be the cause for your error but I got some LOV map errors because of this. There is a thread in the forum on this.
    Ensure that your path and spelling are correct. The error shows ...CostPG. Should it be ...RN perhaps? LOV Regions are usually called RN.
    If all else fails open a tar.

  • How to use : bind character in DB adapter Select Query SOA11g. Getting Error code :17003 .java.sql.SQLException: Invalid column index error

    Hi All,
    The Actual query to perform is below.
    SELECT name,number from emp  WHERE CASE WHEN :1='T' AND term_date IS Not NULL THEN 1 WHEN :1='A' AND term_date IS NULL THEN 1 WHEN :1='ALL' THEN 1 ELSE  1 END = 1;
    I have tried in DB adapter like below as a parameter for :1 as #vInputParam
    SELECT name,number from emp  WHERE CASE WHEN #vInputParam='T' AND term_date IS Not NULL THEN 1 WHEN #vInputParam='A' AND term_date IS NULL THEN 1 WHEN #vInputParam='ALL' THEN 1 ELSE  1 END = 1;
    Getting Error code :17003 .java.sql.SQLException: Invalid column index error.
    Please suggest me on using ':' bind character in DB adapter Select Query SOA11g.
    Can someone help me on this please?
    Thanks,
    Hari

    Hi,
    Could you please make sure your binding style(Oracle Positional,Oracle named..etc) of the Seeded VO and Custom Vo are same.
    This is the option you will get when you are extending your vo. So make sure that both are same.
    You can refer the below link too
    VO extension leads to "Invalid column index" exception
    Thanks
    Bharat

  • Oracle DB Query Generating Invalid Column Index error

    Dear All,
    Apologies for a question on this rather basic error but I don't understand why i'm experiencing the behaviour described.
    The piece of code below connects to a database, runs a query, then attempts to display the contents of the resultset. I understand from other posts on the topic that the query I am executing (INSERT INTO table VALUES (...)) as in the comments below needs to have autocommit disabled to allow me to access the resultset without the transaction closing.
      public void runQuery(String query) throws Exception {   Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con = DriverManager.getConnection(database, username, password); con.setAutoCommit(false); Statement st = con.createStatement();         ResultSet rs = st.executeQuery (query);         // "select * from user_tables"         // "INSERT INTO BH VALUES ('','2.25','Dark Red','Samsonite','4987638762')"         while (rs.next()) {         System.out.print (rs.getString(1)); // Exception thrown here     }         con.commit(); st.close();   con.close();   }
    I have removed try {} catch {} error handling for clarity.
    I am receiving the invalid column index error from the indicated line, which clearly suggest column 1 doesn't exist, however if i run the same query in another tool, something like the following is returned:
    Rows Affected
    1
    The query is being received by the database as the row ends up in the table intact, so I am clearly missing something about how to access the resultset correctly.
    I am guessing that I am either misusing/misunderstanding the autocommit option or that the resultset is different to what I am expecting...
    Can someone please shed a little light?
    Many thanks!
    George

    Ok, I've done a little more digging, and i've come to the conclusion that an INSERT query doesn't return a resultset (or returns an empty one)
    Could someone with a little more knowledge confirm this as I've had little luck finding an explicit yes or no from the web!
    Many Thanks in advance...

  • 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

  • Can someone tell me what's wrong with this LOV query please?

    This query works fine..
    select FILTER_NAME display_value, FILTER_ID return_value
    from OTMGUI_FILTER where username = 'ADAM'
    But this one..
    select FILTER_NAME display_value, FILTER_ID return_value
    from OTMGUI_FILTER where username = apex_application.g_user
    Gives the following error.
    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.
    Thanks very much,
    -Adam vonNieda

    Ya know, I still don't know what's wrong with this.
    declare
    l_val varchar2(100) := nvl(apex_application.g_user,'ADAM');
    begin
    return 'select filter_name display_value, filter_id return_value
    from otmgui_filter where username = '''|| l_val || '''';
    end;
    Gets the same error as above. All I'm trying to do is create a dropdown LOV which selects based on the apex_application.g_user.
    What am I missing here?
    Thanks,
    -Adam

  • Trouble using pipelined function in an select list lov query

    I'm trying to use a pipelined function in a select list lov query but i cet the 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."
    my query is as follows :
    SELECT gt.navn d, gt.GEOGRAPHY_TYPE_ID r
    FROM GEOGRAPHY_TYPE gt
    WHERE gt.kode NOT IN (1)
    and gt.kode in (select lov_value from table(RAPPORT_FILTER_PKG.GET_RAPPORT_FILTER_VALUE_PIP (
    SYS_CONTEXT ('rapport_filter_ctx','filter_id'),'GEOGRAPHY_TYPES')) )
    ORDER BY gt.navn DESC
    if i use a discrete values '80' instead of the call to
    SYS_CONTEXT ('rapport_filter_ctx','filter_id')
    i don't get eny errors, but then the LOV isn't as dynamic as i has to be
    any idears???
    Edited by: [email protected] on Dec 1, 2008 8:50 AM
    Edited by: [email protected] on Dec 1, 2008 11:17 AM

    nope that doesn't do it either
    contains a syntax errror at
    SYS_CONTEXT (('rapport_filter_ctx',:P500_RAPPORT_FILTER_ID),'GEOGRAPHY_TYPES'))
    my theory is that it's got something to do with the way APEX binds values because
    the query
    SELECT gt.navn d, gt.GEOGRAPHY_TYPE_ID r
    FROM GEOGRAPHY_TYPE gt
    WHERE gt.kode NOT IN (1)
    and gt.kode in (select r from table(RAPPORT_FILTER_PKG.GET_RAPPORT_FILTER_VALUE_PIP ('80','GEOGRAPHY_TYPES')) )
    ORDER BY gt.navn DESC
    works fine in both TOAD and in APEX but as soon as i replace th '80' with :P500_RAPPORT_FILTER_ID then, apex won't accept the code??????
    Edited by: [email protected] on Dec 3, 2008 7:54 AM

  • 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

  • LOV query first||last

    I want to create a LOV query that concats the lastname firstname and then returns emp# as the key.
    How do I embed it in such a way to make this happen.
    I used the following but get an error:
    select last_nm ||' '|| first_nm, Employee_nbr from hr.v_keys_employee@dwprod order by 1
    The error is: LOV query is invalid, a display and a return value are needed, the column names need to be different.

    I am doing the same thing. I want only employees of a certain type so I want to join on another table. It took forever to get the syntax just right but this works:
    select fac_contacts.txtlastname ||', '|| fac_contacts.txtfirstname emp_name,
    fac_contacts.id return
    from fac_contacts, fac_lk_contact_types
    where fac_contacts.contacttypeid=fac_lk_contact_types.id
    and fac_lk_contact_types.txtname='Facilities'
    order by 1

Maybe you are looking for

  • Photoshop CC not loading on MacBook Air with Mac OS 10.9 (Mavericks)

    Photoshop CC is not loading at all after updating my 2013 MacBook Air with Mac OS 10.9. The error message (in German as I am using the German version) says "Konnte Photoshop nicht initialisieren da ein Programmfehler aufgetreten ist" ("couldn't initi

  • Reg.Down payment

    Dear All When I give down payment to Vendor I can give only the material value and not including the VAT. We want to give down payment with VAT value. Pls help. Thanks Rajakumar.K

  • RTGD for UCCX 7.x

    customer was to show some real time stats in a RTGD format "wall board" such as call in queue etc...

  • Photostream cant be trusted!

    When photostream was first announced I thought brilliant, I'm going travelling around the world for 12 months in October and photostream would be the perfect way to beam my photos back home so they are safe for when I return. Travelling with my camer

  • Safari screen is grayed out, only thing I can type is control bar

    What should I do to be able to control screen again?