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

Similar Messages

  • 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

  • Select List with Submit : a display and a return value are needed...error

    Hi,
    Why the next SELECT returns error in Select list with submit ?
    List of values definition:
    SELECT b.nom nom_bannniere,
    b.no_banniere no_bann
    FROM banniere@my_source b
    WHERE b.statut = 0
    ORDER BY nom_bannniere;
    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.

    gfrancoeur,
    Try this SQL:
    SELECT b.nom d,
    b.no_banniere r
    FROM banniere@my_source b
    WHERE b.statut = 0
    ORDER BY 1Thanks,
    - 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" 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 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

  • List manager displaying view value and not return value

    Hello,
    I'm using a list manager based on pop-up LOV. When I click on an item on the pop-up window, the window is closed and the return value is inserted in the page textbox. I would like to have (as expected) the view value, and have the return value used just as field value during form submit.
    I'm using Application Express 2.1.0.00.39
    Thanks.
    Eugenio

    Unfortunately, you can't. The way to do it is to return the display value into the List Manger item and then use the APEX_UTIL.STRING_TO_TABLE function to loop through the values and fetch the IDs. You will need to make sure the LOV items are unique and don't contain any colons.
    I hope that helps
    Shunt

  • Dynamic LOV query will not be displayed

    Hello,
    we created the following record group
    select ename, empno from emp order by 1
    then we created a list of values depending on the record group:
    We added ename to  emp.mgr and empno to null in the LOV
    Then we changed  the emp.emg item to type CHAR and POPUP list
    When we run the form nothing is displayed in the colum of MGR and only 1 record in th tabular form is displayed.
    Please help us
    Regards

    When I save nimber with country code contact name will be displayed,
    and if I store the number without the country code and I get a call it does not show the contact name!!
    This problem exists for all Iranians!

  • For particular display and group criteria, we are getting exception

    Hi,
    Please any one assist me on this.
    Error report time: 2008-09-30 09:39:10
    Description of activities in thread [Thread Group for Queue: 'weblogic.kernel.Default'].ExecuteThread: '14' for queue: 'weblogic.kernel.Default'
    Original Stack Trace Info -- com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException:
               Message: A report object, section or area with this name already exists in the report.
               Code: 51412
    com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: A report object, section or area with this name already exists in the report.---- Error code:-2147213281 Error code name:objectAlreadyExists
               at com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException.throwReportDefControllerException(ILjava.lang.String;)V(Unknown Source)
               at com.crystaldecisions.sdk.occa.report.application.ReportSectionController.a(Lcom.crystaldecisions.sdk.occa.report.definition.IArea;Lcom.crystaldecisions.sdk.occa.report.definition.ISection;)V(Unknown Source)
               at com.crystaldecisions.sdk.occa.report.application.ReportSectionController.add(Lcom.crystaldecisions.sdk.occa.report.definition.ISection;Lcom.crystaldecisions.sdk.occa.report.definition.IArea;I)V(Unknown Source)
               at com.ntrs.nmr.util.ce.RASUtility.getSection(Lcom.crystaldecisions.sdk.occa.report.application.ReportClientDocument;Lcom.crystaldecisions.sdk.occa.report.definition.AreaSectionKind;II)Lcom.crystaldecisions.sdk.occa.report.definition.Section;(RASUtility.java:1631)
               at com.ntrs.nmr.util.ce.RASTemplateBuilder.buildAllColumns()V(RASTemplateBuilder.java:1102)
               at com.ntrs.nmr.util.ce.RASTemplateBuilder.buildTemplate()Lcom.crystaldecisions.sdk.occa.report.application.ReportClientDocument;(RASTemplateBuilder.java:76)
               at com.ntrs.nmr.busobj.report.CrystalReportV4.buildTemplateDisplayAndGroups(Lcom.crystaldecisions.sdk.occa.report.application.ReportClientDocument;[Lcom.ntrs.nmr.common.ReportDisplayInfo;[Lcom.ntrs.nmr.common.ReportGroupInfo;[Lcom.ntrs.nmr.common.ReportAvailableColumnInfo;)Lcom.crystaldecisions.sdk.occa.report.application.ReportClientDocument;(CrystalReportV4.java:932)
               at com.ntrs.nmr.busobj.report.CrystalReportV4.customizeTemplate(Lcom.crystaldecisions.sdk.occa.report.application.ReportClientDocument;)V(CrystalReportV4.java:96)
               at com.ntrs.nmr.busobj.report.AbstractCrystalReport.runCrystalEnterpriseReport(Lcom.ntrs.nmr.busobj.report.query.AbstractReportResultSet;Ljava.lang.String;Ljava.lang.String;[Ljava.lang.String;Ljava.util.Properties;[Ljava.lang.String;)V(AbstractCrystalReport.java:510)
               at com.ntrs.nmr.busobj.report.AbstractCrystalReport.runReport()Lcom.ntrs.nmr.common.ReportResultsInfo;(AbstractCrystalReport.java:274)
               at com.ntrs.nmr.busobj.report.CrystalReportV4.runReport()Lcom.ntrs.nmr.common.ReportResultsInfo;(CrystalReportV4.java:51)
               at com.ntrs.nmr.busobj.report.AbstractReport.runDirect()Lcom.ntrs.nmr.common.ReportResultsInfo;(AbstractReport.java:119)
               at com.ntrs.nmr.busobj.execution.ReportExecution.runReport(Lcom.ntrs.nmr.common.ReportExecutionRequestInfo;)Lcom.ntrs.nmr.common.ReportResultsInfo;(ReportExecution.java:644)
               at com.ntrs.nmr.busobj.execution.ReportExecution.runReport(Lcom.ntrs.nmr.common.ReportRequest;)Lcom.ntrs.nmr.common.ReportResultsInfo;(ReportExecution.java:505)
               at com.ntrs.nmr.session.report.ReportBean.runReport(Lcom.ntrs.nmr.common.ReportRequest;)Lcom.ntrs.nmr.common.ReportResultsInfo;(ReportBean.java:93)
               at com.ntrs.nmr.session.report.ReportController_br9wdw_EOImpl.runReport(Lcom.ntrs.nmr.common.ReportRequest;)Lcom.ntrs.nmr.common.ReportResultsInfo;(ReportController_br9wdw_EOImpl.java:100)
               at com.ntrs.nmr.envoy.ReportEnvoy.runReport(Lcom.ntrs.nmr.common.ReportRequest;)Lcom.ntrs.nmr.common.ReportResultsInfo;(ReportEnvoy.java:51)
               at com.ntrs.nmr.action.adh.ModifyRunAction.processRequest(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)Lcom.ntrs.custody.cco.mvc.CCOActionError;(ModifyRunAction.java:426)
               at com.ntrs.custody.cco.mvc.CCOAction.doAction(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)Lcom.ntrs.custody.cco.mvc.CCOActionError;(CCOAction.java:69)
               at com.ntrs.custody.cco.mvc.CCOActionServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(CCOActionServlet.java:104)
               at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(HttpServlet.java:853)
               at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:996)
               at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl;)V(ServletStubImpl.java:419)
               at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(ServletStubImpl.java:315)
               at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6452)
               at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(AuthenticatedSubject.java:321)
               at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(SecurityManager.java:118)
               at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImpl;)V(WebAppServletContext.java:3661)
               at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThread;)V(ServletRequestImpl.java:2630)
               at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:219)
               at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
               at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
               ManagementReportingException Stack Trace:
    com.ntrs.nmr.util.ManagementReportingException: Error while template display and grouping: :com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerExceptionA report object, section or area with this name already exists in the report.
               at com.ntrs.nmr.busobj.report.CrystalReportV4.customizeTemplate(Lcom.crystaldecisions.sdk.occa.report.application.ReportClientDocument;)V(CrystalReportV4.java:98)
               at com.ntrs.nmr.busobj.report.AbstractCrystalReport.runCrystalEnterpriseReport(Lcom.ntrs.nmr.busobj.report.query.AbstractReportResultSet;Ljava.lang.String;Ljava.lang.String;[Ljava.lang.String;Ljava.util.Properties;[Ljava.lang.String;)V(AbstractCrystalReport.java:510)
               at com.ntrs.nmr.busobj.report.AbstractCrystalReport.runReport()Lcom.ntrs.nmr.common.ReportResultsInfo;(AbstractCrystalReport.java:274)
               at com.ntrs.nmr.busobj.report.CrystalReportV4.runReport()Lcom.ntrs.nmr.common.ReportResultsInfo;(CrystalReportV4.java:51)
               at com.ntrs.nmr.busobj.report.AbstractReport.runDirect()Lcom.ntrs.nmr.common.ReportResultsInfo;(AbstractReport.java:119)
               at com.ntrs.nmr.busobj.execution.ReportExecution.runReport(Lcom.ntrs.nmr.common.ReportExecutionRequestInfo;)Lcom.ntrs.nmr.common.ReportResultsInfo;(ReportExecution.java:644)
               at com.ntrs.nmr.busobj.execution.ReportExecution.runReport(Lcom.ntrs.nmr.common.ReportRequest;)Lcom.ntrs.nmr.common.ReportResultsInfo;(ReportExecution.java:505)
               at com.ntrs.nmr.session.report.ReportBean.runReport(Lcom.ntrs.nmr.common.ReportRequest;)Lcom.ntrs.nmr.common.ReportResultsInfo;(ReportBean.java:93)
               at com.ntrs.nmr.session.report.ReportController_br9wdw_EOImpl.runReport(Lcom.ntrs.nmr.common.ReportRequest;)Lcom.ntrs.nmr.common.ReportResultsInfo;(ReportController_br9wdw_EOImpl.java:100)
               at com.ntrs.nmr.envoy.ReportEnvoy.runReport(Lcom.ntrs.nmr.common.ReportRequest;)Lcom.ntrs.nmr.common.ReportResultsInfo;(ReportEnvoy.java:51)
               at com.ntrs.nmr.action.adh.ModifyRunAction.processRequest(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)Lcom.ntrs.custody.cco.mvc.CCOActionError;(ModifyRunAction.java:426)
               at com.ntrs.custody.cco.mvc.CCOAction.doAction(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)Lcom.ntrs.custody.cco.mvc.CCOActionError;(CCOAction.java:69)
               at com.ntrs.custody.cco.mvc.CCOActionServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(CCOActionServlet.java:104)
               at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(HttpServlet.java:853)
               at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:996)
               at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl;)V(ServletStubImpl.java:419)
               at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(ServletStubImpl.java:315)
               at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6452)
               at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(AuthenticatedSubject.java:321)
               at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(SecurityManager.java:118)
               at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImpl;)V(WebAppServletContext.java:3661)
               at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThread;)V(ServletRequestImpl.java:2630)
               at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:219)
               at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
               at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
    Description of activities in thread [Thread Group for Queue: 'weblogic.kernel.Default'].ExecuteThread: '14' for queue: 'weblogic.kernel.Default'
    Work Unit: 552
               Marking Object: com.ntrs.nmr.action.adh.ModifyRunAction
               Marking Thread ID: [Thread Group for Queue: 'weblogic.kernel.Default'].ExecuteThread: '14' for queue: 'weblogic.kernel.Default'
               Initiating Thread ID: [Thread Group for Queue: 'weblogic.kernel.Default'].ExecuteThread: '14' for queue: 'weblogic.kernel.Default'
               Current Activity Label: ModifyRunAction
               Last Mark Time: 2008-09-30-09:38:57.00296
               Activity Messages Follow:
                          ModifyRunAction:begin
                          ReportExecution.runReport(ReportExecutionRequestInfo):begin
                          Oracle query execution:begin
                          Oracle query execution:end
               Marking object is not describable.
    Work Unit: 553
               Marking Object: com.ntrs.nmr.busobj.execution.ReportExecution
               Marking Thread ID: [Thread Group for Queue: 'weblogic.kernel.Default'].ExecuteThread: '14' for queue: 'weblogic.kernel.Default'
               Initiating Thread ID: [Thread Group for Queue: 'weblogic.kernel.Default'].ExecuteThread: '14' for queue: 'weblogic.kernel.Default'
               Current Activity Label: ReportExecution.runReport(ReportExecutionRequestInfo)
               Last Mark Time: 2008-09-30-09:38:57.00921
               Activity Messages Follow:
                          ReportExecution.runReport(ReportExecutionRequestInfo):begin
                          Oracle query execution:begin
                          Oracle query execution:end
               Marking object is not describable.
    Description of activities in thread [Thread Group for Queue: 'weblogic.kernel.Default'].ExecuteThread: '14' for queue: 'weblogic.kernel.Default'
    Work Unit: 552
               Marking Object: com.ntrs.nmr.action.adh.ModifyRunAction
               Marking Thread ID: [Thread Group for Queue: 'weblogic.kernel.Default'].ExecuteThread: '14' for queue: 'weblogic.kernel.Default'
               Initiating Thread ID: [Thread Group for Queue: 'weblogic.kernel.Default'].ExecuteThread: '14' for queue: 'weblogic.kernel.Default'
               Current Activity Label: ModifyRunAction
               Last Mark Time: 2008-09-30-09:38:57.00296
               Activity Messages Follow:
                          ModifyRunAction:begin
                          ReportExecution.runReport(ReportExecutionRequestInfo):begin
                          Oracle query execution:begin
                          Oracle query execution:end
               Marking object is not describable.
    Work Unit: 553
               Marking Object: com.ntrs.nmr.busobj.execution.ReportExecution
               Marking Thread ID: [Thread Group for Queue: 'weblogic.kernel.Default'].ExecuteThread: '14' for queue: 'weblogic.kernel.Default'
               Initiating Thread ID: [Thread Group for Queue: 'weblogic.kernel.Default'].ExecuteThread: '14' for queue: 'weblogic.kernel.Default'
               Current Activity Label: ReportExecution.runReport(ReportExecutionRequestInfo)
               Last Mark Time: 2008-09-30-09:38:57.00921
               Activity Messages Follow:
                          ReportExecution.runReport(ReportExecutionRequestInfo):begin
                          Oracle query execution:begin
                          Oracle query execution:end
               Marking object is not describable.

    Thanks  for your reply.
    These are the display parameters i used to run a report, for this display criteria alone i am getting the exception.
    displayParm =
    1141    0       40      L
    1271    0       16      L
    1033    0       18      L
    1404    0       18      L
    1018    2       20      L
    1000    1       30      L
    1001    0       8       L
    1029    1       40      L
    1030    0       40      L
    If you need more information means, please ask me what are things you are looking for.

  • How to create a display value and a return value for an item

    Hi! I have an item on a form. I want the default value for my item to be :":APP_USER", but the return value, to be the id of my user. I tried to create a PL/SQL Expression for the default item, but it doesn't work. What do I miss?
    It should be something like this, but it's not.
    begin
    select first_name || ',' ||last_name as "Employee",
    id_employee -- display value,return value
    from employees
    where id_employee = :APP_USER;
    end;
    Does anyone know?
    Thanks!
    Vitaly

    Hi VItaly,
    Display value and return value concept applies very well in case of a Combo box if i am correct, I don't know what type of item is your's.
    But any way, you can have a workaround like,
    Create a hidden item such that it's default value should be ID of the user which can be get from db by using :APP_USER.
    Use the this item for your references.
    I think this will meet your requirement.
    Thanks
    Kumaraswamy.

  • Complex MySQL Query, Grouping By Invoice Number and Adding Multiple Values To Insert Into Database

    I have a table that looks like the above. I need to be able to update values in a database based on an ioID (the invoice number)
    The value I need to add is the hours times the uSalary, however as you will notice above the hours can and well have been added on an ongoing basis. For example:
    smarotti has added 4.5 (0.5 + 4.0) hours for the ioID 14190 (last 2 rows) for a total cost of $143.55
    So what I need is to have the value $143.55 update the record 14190 (ioID) on a new column (userCost)
    So:
    the userID - ddevries did 1 hour worth of work at the rate of $23.20 that needs to be update on the record 8026
    the userID - kmurtha did 20 (.5 + .25 + 6.5 + .25 + 6.5 + 6) hours worth of work $696 (20 * 34.80) that needs to be update on the record 9462
    make sense? anyone have any thoughts on how to go about doing this?
    Thanks
    Vern

    Okay
    assuming you add the column to your table the query would look like the below:
    UPDATE workers
                    INNER JOIN (SELECT
                                                    round(SUM(hours*uSalary),1) AS cost,
                                                    ioID,
                                                    userid
                                            FROM
                                                    workers
                                            GROUP BY ioID, userid ) b
                    ON workers.ioID = b.ioID
            SET workers.userCost=b.cost
    WHERE workers.ioid = b.ioID
    AND     workers.userID = b.userID
    Or if you would just like to query the data:
    SELECT  round(SUM(hours*uSalary),1) AS usercost,ioID,userid
    FROM workers
    GROUP BY ioID, userid

  • Calling Stored function and showing returned value on the UI screen

    I am calling a stored function by using the following steps mentioned as per the below link. The stored function returns a single scalar value
    http://download.oracle.com/docs/cd/E1790401/web.1111/b31974/bcadvgen.htm#sm0297_
    Please verify if I am putting the code in the classes as required by the ADF framework.
    * 1) In class CustomApplicationModuleImpl extends ApplicationModuleImpl*
    // Some constants
    public static int NUMBER = Types.NUMERIC;
    public static int DATE = Types.DATE;
    public static int VARCHAR2 = Types.VARCHAR;
    protected Object callStoredFunction(int sqlReturnType, String stmt,
    Object[] bindVars) {
    CallableStatement st = null;
    try {
    // 1. Create a JDBC CallabledStatement
    st = getDBTransaction().createCallableStatement(
    "begin ? := "+stmt+";end;",0);
    // 2. Register the first bind variable for the return value
    st.registerOutParameter(1, sqlReturnType);
    if (bindVars != null) {
    // 3. Loop over values for the bind variables passed in, if any
    for (int z = 0; z < bindVars.length; z++) {
    // 4. Set the value of user-supplied bind vars in the stmt
    st.setObject(z + 2, bindVars[z]);
    // 5. Set the value of user-supplied bind vars in the stmt
    st.executeUpdate();
    // 6. Return the value of the first bind variable
    return st.getObject(1);
    catch (SQLException e) {
    throw new JboException(e);
    finally {
    if (st != null) {
    try {
    // 7. Close the statement
    st.close();
    catch (SQLException e) {}
    With a helper method like this in place, calling the func_with_no_args procedure shown in Example 37-7 would look like this:
    *2) In class CustomServiceImpl extends CustomApplicationModuleImpl*
    public String callEnvironmentName(){
    return (String) callStoredFunction(VARCHAR2, "CAR_UTIL_PK.get_environment_name()", new Object[] {});
    3) If I have the first two steps correct, I was to display the value returned by method callEnvironmentName() with scalar values like (Development, Production etc) at the footer of each JSFX page. What is the flow I should follow, should I call callEnvironmentName() from some managed bean? Also I want to store it once on first call to some application variable and use that to populate the JSFX pages. Is there a working example. What is the best practice?
    Thanks
    Edited by: user5108636 on Apr 5, 2011 11:58 PM

    Hi John,
    Duplicate alerts are coming for BP_Confirmed as well as one custom event. Earlier I thought there is some issue with my custom event, but when it came for BP_Confirmed also, then i have a doubt something is wrong with the application.
    I have also checked that BP_Confirmed is being raised only once inside the method-BP_CONFIRM of class-cl_crmcmp_b_cucobupa_impl.
    raise event BPConfirmed
      CLASS cl_crm_ic_services DEFINITION LOAD.
      CREATE OBJECT event.
      event->set_name( if_crm_ic_events_con=>gc_bpconfirmed ).
      event_srv = cl_crm_ic_services=>get_event_srv_instance( ).
      event_srv->raise( event ).
    Are you aware of any other place from where this event is getting triggered?
    Thanks for your help!
    Regards,
    Rohit

  • How Stuck Thread Timeout and JTA timeout values are related.

    Hi All,
    Can some one help me in understanding the the relation between Stuck Thread Time out and JTA timeout values.
    Thanks,
    Vardhan

    Hi,
    Both are totally different in this case.
    Stuck thread timeout is specific to weblogic monitoring guide line which inform you how long every thread is in process continuously by default it would 600 sec if any thread is taken more than 600 sec to finish off its work then weblogic will throw an error message that specific thread took more than 600 seconds.
    Note: Mostly of the time these stuck thread are not really an issue
    Where are JTA timeout on global side is specific to your every transaction either from EJB or JMS or JDBC transaction.
    This timeout will rule on every individual.
    Hope you got address your query.
    Regards,
    Kal

  • How to get both, the ResultSet and Output (return value) from Oracle Stored Procedure

    Hi! I am doing a conversion from MSSQL to Oracle with C++ and MFC ODBC. Any comment is appreciated!! I have Oracle 8i and Oracle ODBC 8.1.6 installed.
    My question is how to retrieve the return value AND ALSO the resultSet at the same time by using Oracle function without modifying my souce codes (except puttting mypackage. string infron of my procedure name, see below).
    -- My source code in C++ with MSSQL ....
    sqlStr.Format("{? = call ListOfCustomers(%i)}", nNameID);
    RcOpen = CustomerList.Open(CRecordset::forwardOnly, sqlStr, CRecordset::readOnly );
    Where CustoemrList is a Crecordset object...
    IN DoFieldExchange(CFieldExchange* pFX) I have ...
    //{{AFX_FIELD_MAP(CQOSDB_Group)
    pFX->SetFieldType(CFieldExchange::outputColumn);
    RFX_Long(pFX, T("Name"), mCustoemrName);
    //}}AFX_FIELD_MAP
    // output parameter
    pFX->SetFieldType( CFieldExchange::outputParam );
    RFX_Int( pFX, T("IndexCount"), mCustomerNumber);
    -- m_CustomerNumber is where i store the return value!!!
    -- In Oracle Version, i have similar codes with ...
    sqlStr.Format("{? = call mypackage.ListOfCustomers(%i)}", nNameID);
    RcOpen = CustomerList.Open(CRecordset::forwardOnly, sqlStr, CRecordset::readOnly );
    -- I have oracle package/Body codes as following...
    create or replace package mypackage
    as
    type group_rct is ref cursor;
    Function listgroups(
    nameID NUMBER ,
    RC1 IN OUT Mypackage.group_rct ) return int;
    end;
    Create or replace package body mypackage
    as
    Function listgroups(
    NameID NUMBER ,
    RC1 IN OUT Mypackage.group_rct )return int
    IS
    BEGIN
    OPEN RC1 FOR SELECT Name
    from Customer
    WHERE ID = NameIDEND ListGroups;
    END
    return 7;
    END listgroups;
    END MyPackage;
    Ive simplified my codes a bit....
    null

    yes, it is exactly what i want to do and I am using Oracle ODBC driver.
    I tried using procedure with 1 OUT var fo numeric value and the other IN OUT ref cursor var instead of function, but error occurs when I called it from the application. It give me a memory ecxception error!!
    sqlStr.Format("{? = call ListOfCustomers(%i)}", nNameID);
    RcOpen = CustomerList.Open(CRecordset::forwardOnly, sqlStr, CRecordset::readOnly );
    it seems to me that the ? marker var is making all the trouble... can you please give me any more comment on this?? thanks!
    null

  • Call script in a workflow and get return value?

    hello
    I want create a workflow to check some attribute in IDM
    like for the home directory, use the workflow call some script to check there is enough space in the server? and the folder is almost there or not?
    then get the return value like if no enought space, call some other form let the admin input some new home directory string
    So I want to know how a workflow work with scipt file?
    I also use some after create action script, but it looks only can get some error message and shows in th IDM.

    This should help you:
    http://www.devdaily.com/java/edu/pj/pj010016/pj010016.shtml
    Note that the command will be executed by the application server user so check if it has sufficient rights.
    Ben

Maybe you are looking for