Need help in Bind variable in AF Query LOV

Hi,
i have one problem with bind variable, if i use bind variable in the LOV VO Query then my result is not coming, if there is not bind variable it's working fine and if i use the bind variable in the LOV search option then it's working fine but if i hide the bind variable and set the value in AM prepareSesstion method the LOV is not returning any value. I try to return the values also all values are also coming but those values are not setting to AF Query Attribute.
Query is:
select substr(d.description,0,40) description
from cm_system_users a,
cm_user_responsibilities b,
cm_responsibility_processes c,
cm_processes d
where a.nt_login =:B_NT_LOGIN
and a.user_id = b.user_id
and trunc(sysdate) between b.eff_date and nvl(b.exp_date,sysdate + 1)
and b.RESPONSIBILITY_ID = c.RESPONSIBILITY_ID
and c.process_type = d.process_type
and d.enabled_flag = 'Y' order by d.arguments_flag
AM Method:
CmProcessViewImpl vo = getCmProcessView();
String nt_login = getUserPrincipalName();
vo.setNamedWhereClauseParam("B_NT_LOGIN", nt_login.toUpperCase());
vo.executeQuery();
Can any one help me in this. it's urgent for me.

This is a little underdescribed. IIUC, the view object in question is being used as a target for a view accessor, correct? (Otherwise you'll have to be more explicit about what you mean by "Query LOV".
If I'm right, there are two possibilities:
1) You are using a VO instance in a shared application module instance. If so, make sure your code is in the prepareSession() for that application module class if it's session dependent (as it seems to be below), you need to make sure the application module instance is shared at session scope.
2) You've based the view accessor directly on the VO definition. This basically creates an anonymous VO instance; I don't think there's any way to use prepareSession() to set a bind variable on such an instance (which won't be created until the accessor is first used). You might be able to get by with putting similar code into the view object class' create() method, but I haven't tested this.
If your code is in your primary application module class (as opposed to the class for a shared AM instance), the problem here is that getCmProcessView() returns the VO instance from that application module instance's design-time data model, which is never used by view accessors.
By the way, why do you need to do this in prepareSession() instead of at the view accessor level? I believe you can get the logged in user name (for the view accessor) in with the groovy expression
viewObject.DBTransaction.session.userPrincipalName
or possibly just
DBTransaction.session.userPrincipalName
(despite this involving DBTransaction, it returns the web app user name, not the DB username).
That's a 100% declarative solution, if you don't count the Groovy expression as non-declarative.
If you're afraid of a user executing the LOV (somehow) before the bind variable value gets set, just ensure that the bind variable is marked "required".

Similar Messages

  • [Oracle 8i] Need help with bind variable in add_months function

    I'm trying to put a variable within my add_months function:
    AND     t1.edatetime >= add_months(sysdate,:v1)
    AND     t1.edatetime <= add_months(sysdate,:v2)I have tried defining the variable both as 'integer' type and 'numeric' type, but in both cases, my query returns no results. If I hard code the values, it works just fine.
    Any suggestions?

    Hi,
    Sorry, I can't reproduce the problem.
    What do you mean by "I have tried defining the variable both as 'integer' type and 'numeric' type"?
    Like Max said, you should post a complete script that gets the incorrect results.
    Include your CREATE TABLE and INSERT statements, or use tables that are commonly available.
    For example:
    VARIABLE      v1     NUMBER
    VARIABLE      v2     NUMBER
    EXEC  :v1 := -28 * 12;
    EXEC  :v2 := -27 * 12;
    PROMPT       ===== Checking values of bind variables  =====
    SELECT       :v1
    ,       :v2
    FROM       dual;
    PROMPT       =====  Main query (expecting 1 row of output) =====
    SELECT       ename
    ,       hiredate
    FROM       scott.emp
    WHERE       hiredate     >= ADD_MONTHS (SYSDATE, :v1)
    AND       hiredate     <= ADD_MONTHS (SYSDATE, :v2)
    ;Output:
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    ===== Checking values of bind variables  =====
           :V1        :V2
          -336       -324
    =====  Main query (expecting 1 row of output) =====
    ENAME      HIREDATE
    MILLER     23-Jan-1982

  • Passing values in a vector list as bind variables in sql query.

    Hi,
    I have a vector list containing values 12,13,14.
    vector<string> v;
    v has values 12,13 and 14.
    Here the number of values in vector list are not fixed.
    I want to pass these values as bind variables to sql query.
    Can anyone suggest me how to do this.
    Thanks in advance!!

    Ah, the it's the classic 'Varying In-List' again
    See:
    The Tom Kyte Blog: Varying in lists...
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:110612348061 (started more than a decade ago, so scroll down for more recent examples)

  • Bind variables in SQL query of DBAdapter

    Hi,
    Can we add bind variables to SQL query when we define DB adapter...?

    No, not in the Wizard.
    I do not know if it is possible with the TopLink in combination with BPEL.
    But can you use a Pl/SQL procudere/package that performs the dynamic SQL?

  • How to pass a value to a bind variable in a query report in oracle apex

    Hi Guys,
    I have requirement to send weekly reports via email to some users. The users should receive their own records in the report. The user details is stored in a table. What I am planning to do is to create a report query in oracle apex to generate the report and then run a function/procedure via a scheduler to email the report to respective users. Now my query is ............. is it possible to pass a value (user name) to the report query to pull records of only that user? I know we can have bind variables in the report query but I have no idea how to pass a value for bind variables from a function/procedure.
    Can anyone help me on this issue or suggest a better approach?
    Thanks,
    San

    You need to use dynamic sql
    But please keep in mind that since you're using Oracle you may be better off posting this in some Oracle forums
    This forum is specifically for SQL Server
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Please help on binding variables

    Hello,
    I need to bind the variable in following function.
    If the single deptno is passed into function, the function will return correct result. However, if the set of deptno is passed, the function cannot give correct result.
    Could anyone please help me on it...
    Thanks in advance!!!
    scott@ORA111>create or replace function my_test (p_deptno_list varchar2)
    2 return sys_refcursor
    3 as
    4 rec sys_refcursor;
    5 v_sql varchar2(1000);
    6
    7 begin
    8 v_sql := 'select * from emp where deptno in (:1)';
    9 open rec for v_sql using p_deptno_list;
    10 return rec;
    11
    12 end;
    13 /
    Function created.
    Elapsed: 00:00:00.04
    scott@ORA111>var my_rec refcursor
    scott@ORA111>execute :my_rec := my_test('10');
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    scott@ORA111>print :my_rec
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7782 CLARK MANAGER 7839 09-JUN-81 2450 10
    7839 KING PRESIDENT 17-NOV-81 5000 10
    7934 MILLER CLERK 7782 23-JAN-82 1300 10
    9999 TEMP SALESMAN 7782 27-APR-09 6000 10
    Elapsed: 00:00:00.01
    scott@ORA111>var my_rec refcursor
    scott@ORA111>execute :my_rec := my_test('10, 20');
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.01
    scott@ORA111>print :my_rec
    ERROR:
    ORA-12801: error signaled in parallel query server P000
    ORA-01722: invalid number
    no rows selected
    Elapsed: 00:00:00.01

    Hello Beijing,
    Thank you so much for your help!!!
    We need a procedure/function to take the inputs as query conditions, execute the query, store the result in refer cursor and pass it into Client Application.
    With the help on this Forum, I have done following test. Only one thing that I have not figure out is the variable-list. As you know the line 15 in my procedure will not give the correct result. However, I am not able to concatenate the bind variable in the string.
    Please help, thanks again.
    SQL> create or replace function test_function
    2 (p_deptno_list varchar2,
    3 p_hire_start emp.hiredate%type,
    4 p_hire_end emp.hiredate%type,
    5 p_job emp.job%type)
    6 return sys_refcursor
    7 as
    8 rec sys_refcursor;
    9 v_sql varchar2(1000);
    10
    11 begin
    12 v_sql := 'select * from emp';
    13
    14 if p_deptno_list is not null then
    15 v_sql := v_sql ||' where instr(replace(:1, '' '', ''''), deptno) > 0';
    16 else
    17 v_sql := v_sql ||' where :1 is null';
    18 end if;
    19
    20 if p_hire_start is not null and p_hire_end is not null then
    21 v_sql := v_sql ||' and hiredate between :2 and :3';
    22 else
    23 v_sql := v_sql ||' and :2 is null and :3 is null';
    24 end if;
    25
    26
    27 if p_job is not null then
    28 v_sql := v_sql ||' and job = :4';
    29 else
    30 v_sql := v_sql ||' and :4 is null';
    31 end if;
    32
    33 open rec for v_sql using p_deptno_list, p_hire_start, p_hire_end, p_job;
    34 return rec;
    35
    36 end;
    37 /
    Function created.
    SQL> set lin 200
    SQL> var rec refcursor
    SQL> execute :rec := test_function(null, null, null, null);
    PL/SQL procedure successfully completed.
    SQL> print rec
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7369 SMITH CLERK 7902 17-DEC-80 800 20
    7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
    7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
    7566 JONES MANAGER 7839 02-APR-81 2975 20
    7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
    7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
    7782 CLARK MANAGER 7839 09-JUN-81 3450 10
    7788 SCOTT ANALYST 7566 19-APR-87 3000 20
    7839 KING PRESIDENT 17-NOV-81 6000 10
    7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
    7876 ADAMS CLERK 7788 23-MAY-87 1100 20
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7900 JAMES CLERK 7698 03-DEC-81 950 30
    7902 FORD ANALYST 7566 03-DEC-81 3000 20
    7934 MILLER CLERK 7782 23-JAN-82 4300 10
    14 rows selected.
    SQL> execute :rec := test_function('20, 30', null, null, null);
    PL/SQL procedure successfully completed.
    SQL> print rec
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7369 SMITH CLERK 7902 17-DEC-80 800 20
    7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
    7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
    7566 JONES MANAGER 7839 02-APR-81 2975 20
    7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
    7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
    7788 SCOTT ANALYST 7566 19-APR-87 3000 20
    7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
    7876 ADAMS CLERK 7788 23-MAY-87 1100 20
    7900 JAMES CLERK 7698 03-DEC-81 950 30
    7902 FORD ANALYST 7566 03-DEC-81 3000 20
    11 rows selected.
    SQL> execute :rec := test_function('20', to_date('01-JAN-1981','DD-MON-YYYY'), to_date('31-DEC-1981','DD-MON-YYYY'), null);
    PL/SQL procedure successfully completed.
    SQL> print rec
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7566 JONES MANAGER 7839 02-APR-81 2975 20
    7902 FORD ANALYST 7566 03-DEC-81 3000 20
    SQL> execute :rec := test_function('20', to_date('01-JAN-1981','DD-MON-YYYY'), to_date('31-DEC-1981','DD-MON-YYYY'), 'MANAGER');
    PL/SQL procedure successfully completed.
    SQL> print rec
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7566 JONES MANAGER 7839 02-APR-81 2975 20
    SQL> spool off

  • How to use SYSDATE as a default value of a bind variable in a query report?

    Hi,
    I want to use SYSDATE as default value for a bind variable in Query based report.
    I don't see any way to do it, someone helps?
    Thanks a lot.
    Paulo.

    You can aslo use #sysdate directly.
    Hi,
    The way I'm doing in my report is, I have a database function (f_ret_sysdate) with the following code
    create function f_ret_sysdate return varchar2
    begin
    return to_char(sysdate,'mm/dd/yyyy');
    end;
    Now, in the 'Customization Form Display Options' section of the report I'm calling this function as #f_ret_sysdate in the default value field of corresponding bind variable to display SYSDATE with the format.
    Hope this helps!...
    -Krishnamurthy

  • How to use bind variable in the query to avoid hard parsing

    Hi,
    I have a query which is using literals
    strquery:='SELECT SUMTOTAL FROM tab1 WHERE BATCHNO = '''
          || gBNo
          || ''' AND A_ID = '''
          || g_id
          || ''' AND L_ID = '''
          || g_LId
          || '''  AND S_Code = ''C_3'' ';
    execute immediate strquery;I have been asked to use a bind variable to avoid hard parsing.
    How do i do it?
    Edited by: user8731258 on Jul 27, 2012 5:07 AM
    Edited by: user8731258 on Jul 27, 2012 5:08 AM

    You dont need Dynamic SQL. Your Table and Column Name are static in that query. Just use Static SQL
    SELECT SUMTOTAL
      INTO lSumTotal
      FROM tab1
    WHERE BATCHNO = gBatchNo
       AND ATM_ID  = gAtm_id
       AND LOAD_ID = gLoadId
       AND STEP_CODE = 'C_3';

  • HELP: VO Bind variable gets lost, VO passivation checked!

    JDEv 10.1.3.0.4 + Struts/ADF
    I have a VO with one bind variable "accountId", this VO is the "root master" of the hierarchy => not a detail of a link.
    I added a method in the VO (that is part of one AM only) to set the bind variable:
      WHERE CLAUSE:
    (Wevent.EVENT_ID = WeventDesign.EVENT_ID) AND (Wevent.ACCOUNT_ID = AccountOwner.ACCOUNT_ID) AND (Wevent.PHOTOGRAPHER_ACCOUNT_ID = AccountPhotoGrapher.ACCOUNT_ID) AND (Wevent.EVENT_STATUS BETWEEN 30 AND 80) AND (Wevent.ACCOUNT_ID = :0)
      Binding Style: Oracle Positional
      private Number accountId = null;
      private Object[] DEFAULT_VALUES = new Object[]{ Constants.NUMBER_ZERO };
      private static int NUM_DEFAULT_VALUES = DEFAULT_VALUES.length;
      public Row setAccountId(Number newAccountId)
        Row row = null;
        if (newAccountId == null)
        this.accountId = null;
        this.clearCache();
        System.out.println(getClass().getName()+".setAccountId no exeqry newAccountId == null");    
        else
          this.accountId = newAccountId;
          row = this.getCurrentRow();
          if(row == null || row.getAttribute("AccountId") == null || !newAccountId.equals(row.getAttribute("AccountId")))  
    // not good account events !!!!
          this.setWhereClauseParam(0,newAccountId);
          System.out.println(getClass().getName()+".setAccountId before exeqry newAccountId: "+newAccountId);    
          this.executeQuery();
    //      System.out.println(getClass().getName()+".setAccountId after exeqry getRowCount(): "+this.getRowCount());    
          row = this.first();
            if (row != null)
            System.out.println(getClass().getName()+".setAccountId after exeqry+first row.getAttribute(AccountId): "+row.getAttribute("AccountId"));            
            else
            System.out.println(getClass().getName()+".setAccountId after exeqry+first row is null => no rows");                    
          else
          System.out.println(getClass().getName()+".setAccountId NO exeqry this.accountId: "+this.accountId+", newAccountId: "+newAccountId+" current is null? "+(this.getCurrentRow() == null));          
          this.accountId = newAccountId;   
          DEFAULT_VALUES[0] = newAccountId;
          System.out.println(getClass().getName()+".setAccountId this.accountId: "+this.accountId+", newAccountId: "+newAccountId+", DEFAULT_VALUES[0]: "+DEFAULT_VALUES[0]);          
        return row;
    In the AMImpl class I added a service method:
      public Row prepareModelForEventAccountOwnerList(Number accountId)
        EventAccountOwnerListExtVOImpl eventAccountOwnerListExtVOImpl = this.getEventAccountOwnerListExtVO1();
        return eventAccountOwnerListExtVOImpl.setAccountId(accountId);
      }When the user logs in his accountId is retrieved and stored in the HttpSession.
    and the service method is called.
    Ok at this point.
    I have a Page that displays the view.
    In the class AccountEventsAction that extends PagingDataForwardAction I have following initializeModelForPage method.
      protected void initializeModelForPage(DataActionContext ctx)
        System.out.println(getClass().getName()+".initializeModelForPage BEGIN "+System.currentTimeMillis());
        WebAccountAM webAccountAM = (WebAccountAM) this.getApplicationModule(WebConstants.AM_WEBACCOUNT,ctx);
        if (webAccountAM == null)
         // return error
         System.out.println(getClass().getName()+".initializeModelForPage webAccountAM not found.");
        else
          UserContainer userContainer = this.getUserContainer(ctx);
          Row row = webAccountAM.prepareModelForEventAccountOwnerList(userContainer.getAccountId());
          if (row != null)
          System.out.println(getClass().getName()+".initializeModelForPage userContainer.getAccountId(): "+userContainer.getAccountId()+", EventId: "+row.getAttribute("EventId")+", current row key: "+row.getKey());             
          else
          System.out.println(getClass().getName()+".initializeModelForPage userContainer.getAccountId(): "+userContainer.getAccountId()+", First row is null? "+(row == null));     
          super.initializeModelForPage(ctx);
        }To my knowledge because this page is accessible only after login and the VO passivation state (+bind vars ..) is yes it shouldn't be necessary?
    FIRST PROBLEM:(non blocking)
    =============
    I noticed in my trace that the VO current row is null when the service method gets called in the initializeModelForPage binding method?
    So the query gets re-exceuted, is this normal??
    SECOND PROBLEM (blocking)
    ================
    At some point the Web app. the frameworks calls the executeQueryForCollection and an exception is thrown as if the bind variable was lost???
    extract:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.SQLStmtException, msg=JBO-27122: SQL error during statement preparation.  Statement: SELECT Wevent.EVENT_ID, ...       
    FROM WEVENT Wevent, WEVENT_DESIGN WeventDesign, ACCOUNT AccountOwner, ACCOUNT AccountPhotoGrapher WHERE (Wevent.EVENT_ID = WeventDesign.EVENT_ID) AND (Wevent.ACCOUNT_ID = AccountOwner.ACCOUNT_ID) AND (Wevent.PHOTOGRAPHER_ACCOUNT_ID = AccountPhotoGrapher.ACCOUNT_ID) AND (Wevent.EVENT_STATUS BETWEEN 30 AND 80) AND (Wevent.ACCOUNT_ID = :0) ORDER BY Wevent.T_MODIFIED
         at oracle.jbo.JboException.<init>(JboException.java:346)
         at oracle.adf.controller.lifecycle.PageLifecycle.handleError(PageLifecycle.java:722)
         at oracle.adf.controller.struts.actions.DataAction.handleError(DataAction.java:257)
         at oracle.adf.controller.struts.actions.DataAction.handleError(DataAction.java:453)
         at oracle.adf.controller.lifecycle.PageLifecycle.handleLifecycle(PageLifecycle.java:147)
         at oracle.adf.controller.struts.actions.DataAction.handleLifecycle(DataAction.java:223)
         at com.photoswing.webview.actions.BaseDataForwardAction.handleLifecycle(BaseDataForwardAction.java:239)
         at oracle.adf.controller.struts.actions.DataAction.execute(DataAction.java:155)
         at oracle.adf.controller.v2.struts.actions.DataAction.execute(DataAction.java:104)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:434)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at com.photoswing.filter.LocaleFilter.doFilter(LocaleFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ## Detail 0 ##
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. 
    06/10/13 22:37:15 java.sql.SQLException: Missing IN or OUT parameter at index:: 1
    06/10/13 22:37:15      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)I hope I didn't miss something and I don't have to review all my bind variables setting methods!
    Your help is required and will be appreciated
    Fred

    More info:
    I added a trace in the executeQueryForCollection method of the VO.
    As I said before the binding var is set on login and in initializeModelForPage
    but when the executeQueryForCollection is called by framework later on in the action cycle, it is called without any parameters => bind variables = numUserParams: 0 ??
    trace extract
    com.photoswing.model.site.EventAccountOwnerListExtVOImpl.executeQueryForCollection this.accountId: null, numUserParams: 0, DEFAULT_VALUES[0]: 0
    I suppose that some code must be added so that my bind variables will be part of the passivation process.
    Can you help me with that?
    Thanks for your time.
    Fred
    PS It's my second day on this problem.

  • A little bit of help with Bind variables please

    Hi,
    I am having a bit of trouble with bind variables I have been looking at the Dev guide and the forum to try and achieve this and it is still not happening for me, could anybody please help or point me in the right direction:
    I have created a simple PersonVO with the basic query:
    Select distinct full_name from xxml_people where person_id = :1
    In the PersonVOImpl.java I have added the method:
    public void initQuery(String personId)
    Number person = null;
    try
    person = new Number(personId);
    catch
    (Exception e){}
    setWhereClauseParam(1,person);
    executeQuery();
    Then in the PersonAM I have added the method:
    public void initPersonQuery(String personId)
    getPersonVO1().initQuery(personId);
    I then call this method in my processRequest section of my page controller:
    PersonAMImpl am = (PersonAMImpl) pageContext.getRootApplicationModule();
    String personId = "581";
    am.initPersonQuery(personId);
    When I try and run this I get the error:
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT distinct full_name from xxml_absence_calendar where person_id = :1
    java.sql.SQLException: ORA-01006: bind variable does not exist
    Am I binding the variables correctly? Or am I making some stupid mistake?
    I am ultimately looking to create a messageChoice where the logged in user will see a list of all organisations underneath him and the one level above. I plan to do this by passing the User’s Organisation name into a VO query using the organisation as a Bind Variable. I think once I have worked out how to bind variables this should be straight forward.
    Many Thanks

    Even though the parameter binding values may be same, you should never use the positional param more than once. So always go for the format
    select distinct full_name from xxml_people where supervisor_id = :1
    UNION
    select distinct full_name from xxml_people where person_id = :2
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • NEED HELP IN REDUCING THE LENGTH OF QUERY WHICH IS ATTACHED IN A FILE PL_SQ

    Hi Everyone,
    THANKS FOR POSTING THE REPLIES FOR MY LAST THREAD. THAT REALLY HELPED. I CAME BACK AGAIN BECAUSE I NEED HELP FROM THIS FORUM IN REDUING THE LENGTH OF MY QUERY WHICH I HAD GIVEN BELOW. i DIDN'T HAD THE CHOICE OF ATTACHING A FILE OF MY DATA HERE.ITS VERY HUGE DATA SO I AM NOT ABLE TO PROVIDE ATLEAST SAMPLE DATA BECAUSE THE COLUMNS ARE OVERLAPPING IF I AM PASTING THE DATA HERE. I HOPE IT WILL BE UNDERSTANDABLE. THE QUERY WHICH I WROTE IS TOO LONG AND TAKING HOURS TOGETHER TO RUN AND DISPLAY RESULT. IT WOULD BE A GREAT FAVOUR TO ME IF ANYONE CAN REDUCE THE LINES IN MY QUERY AND MAKE IT RUN FAST....PLEASE I WAS NOT KNOWING THE WAY HOW TO MAKE IT SHORT. IT HAS MANY LOGICS IN IT... :? PLEASE SUGGEST ME IF THERE IS ANY OPTION FOR ATTACHING A FILE SO THAT I CAN SEND MY SAMPLE DATA...
    select pt.product code,
    pt.product status,
    pt.store code,
    pt.store status,
    pr.scheduled date,
    pr.actual date,
    pl.scheduled date,
    pl.actual date,
    ps.scheduled date,
    ps.actual date,
    fo.scheduled date,
    fo.actual date,
    fb.scheduled date,
    fb.actual date,
    fod.scheduled date,
    fod.actual date,
    lo.scheduled date,
    lo.actual date,
    lom.scheduled date,
    lom.actual date,
    lod.scheduled date,
    lod.actual date,
    /*pr*/
    case
    WHEN pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' OR
    pt.store status = 'Active' THEN
    NVL2(pr.scheduled date,
    cast(pr.scheduled date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Planned' THEN
    NVL2(pr.scheduled date,
    cast(pr.scheduled date AS nvarchar2(30)),
    'Null')
    end as DER_pr_SHC,
    case
    when pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' THEN
    NVL2(pr.actual date,
    cast(pr.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    pr.scheduled date is null THEN
    NVL2(pr.actual date,
    cast(pr.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    pr.scheduled date < CURRENT_DATE THEN
    NVL2(pr.actual date,
    cast(pr.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    pr.scheduled date >= CURRENT_DATE THEN
    NVL2(pr.actual date,
    cast(pr.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'Planned' and
    pr.scheduled date is null THEN
    NVL2(pr.actual date,
    cast(pr.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'Planned' and
    pr.scheduled date < CURRENT_DATE THEN
    NVL2(pr.actual date,
    cast(pr.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Planned' and
    pr.scheduled date >= CURRENT_DATE THEN
    NVL2(pr.actual date,
    cast(pr.actual date AS nvarchar2(30)),
    'N/A')
    end as DER_pr_ACT,
    /*pl*/
    case
    WHEN pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' OR
    pt.store status = 'Active' THEN
    NVL2(pl.scheduled date,
    cast(pl.scheduled date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Planned' THEN
    NVL2(pl.scheduled date,
    cast(pl.scheduled date AS nvarchar2(30)),
    'Null')
    end as DER_pl_SHC,
    case
    when pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' THEN
    NVL2(pl.actual date,
    cast(pl.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    pl.scheduled date is null THEN
    NVL2(pl.actual date,
    cast(pl.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    pl.scheduled date < CURRENT_DATE THEN
    NVL2(pl.actual date,
    cast(pl.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    pl.scheduled date >= CURRENT_DATE THEN
    NVL2(pl.actual date,
    cast(pl.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'Planned' and
    pl.scheduled date is null THEN
    NVL2(pl.actual date,
    cast(pl.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'Planned' and
    pl.scheduled date < CURRENT_DATE THEN
    NVL2(pl.actual date,
    cast(pl.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Planned' and
    pl.scheduled date >= CURRENT_DATE THEN
    NVL2(pl.actual date,
    cast(pl.actual date AS nvarchar2(30)),
    'N/A')
    end as DER_pl_ACT,
    /*ps*/
    case
    WHEN pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' OR
    pt.store status = 'Active' THEN
    NVL2(ps.scheduled date,
    cast(ps.scheduled date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'planned' THEN
    NVL2(ps.scheduled date,
    cast(ps.scheduled date AS nvarchar2(30)),
    'Null')
    end as DER_ps_SHC,
    case
    when pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' THEN
    NVL2(ps.actual date,
    cast(ps.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    ps.scheduled date is null THEN
    NVL2(ps.actual date,
    cast(ps.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    ps.scheduled date < CURRENT_DATE THEN
    NVL2(ps.actual date,
    cast(ps.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    ps.scheduled date >= CURRENT_DATE THEN
    NVL2(ps.actual date,
    cast(ps.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'planned' and
    ps.scheduled date is null THEN
    NVL2(ps.actual date,
    cast(ps.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'planned' and
    ps.scheduled date < CURRENT_DATE THEN
    NVL2(ps.actual date,
    cast(ps.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'planned' and
    ps.scheduled date >= CURRENT_DATE THEN
    NVL2(ps.actual date,
    cast(ps.actual date AS nvarchar2(30)),
    'N/A')
    end as DER_ps_ACT,
    /*fo*/
    case
    WHEN pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' OR
    pt.store status = 'Active' THEN
    NVL2(fo.scheduled date,
    cast(fo.scheduled date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'planned' THEN
    NVL2(fo.scheduled date,
    cast(fo.scheduled date AS nvarchar2(30)),
    'Null')
    end as DER_fo_SHC,
    case
    when pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' THEN
    NVL2(fo.actual date,
    cast(fo.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    fo.scheduled date is null THEN
    NVL2(fo.actual date,
    cast(fo.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    fo.scheduled date < CURRENT_DATE THEN
    NVL2(fo.actual date,
    cast(fo.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    fo.scheduled date >= CURRENT_DATE THEN
    NVL2(fo.actual date,
    cast(fo.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'planned' and
    fo.scheduled date is null THEN
    NVL2(fo.actual date,
    cast(fo.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'planned' and
    fo.scheduled date < CURRENT_DATE THEN
    NVL2(fo.actual date,
    cast(fo.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'planned' and
    fo.scheduled date >= CURRENT_DATE THEN
    NVL2(fo.actual date,
    cast(fo.actual date AS nvarchar2(30)),
    'N/A')
    end as DER_fo_ACT,
    /*fb*/
    case
    WHEN pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' OR
    pt.store status = 'Active' THEN
    NVL2(fb.scheduled date,
    cast(fb.scheduled date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'planned' THEN
    NVL2(fb.scheduled date,
    cast(fb.scheduled date AS nvarchar2(30)),
    'Null')
    end as DER_fb_SHC,
    case
    when pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' THEN
    NVL2(fb.actual date,
    cast(fb.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    fb.scheduled date is null THEN
    NVL2(fb.actual date,
    cast(fb.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    fb.scheduled date < CURRENT_DATE THEN
    NVL2(fb.actual date,
    cast(fb.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    fb.scheduled date >= CURRENT_DATE THEN
    NVL2(fb.actual date,
    cast(fb.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'planned' and
    fb.scheduled date is null THEN
    NVL2(fb.actual date,
    cast(fb.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'planned' and
    fb.scheduled date < CURRENT_DATE THEN
    NVL2(fb.actual date,
    cast(fb.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'planned' and
    fb.scheduled date >= CURRENT_DATE THEN
    NVL2(fb.actual date,
    cast(fb.actual date AS nvarchar2(30)),
    'N/A')
    end as DER_fb_ACT,
    /*fod*/
    case
    WHEN pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Compldeted' OR
    pt.store status = 'Active' THEN
    NVL2(fod.scheduled date,
    cast(fod.scheduled date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'pldanned' THEN
    NVL2(fod.scheduled date,
    cast(fod.scheduled date AS nvarchar2(30)),
    'Null')
    end as DER_fod_SHC,
    case
    when pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' THEN
    NVL2(fod.actual date,
    cast(fod.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    fod.scheduled date is null THEN
    NVL2(fod.actual date,
    cast(fod.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    fod.scheduled date < CURRENT_DATE THEN
    NVL2(fod.actual date,
    cast(fod.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    fod.scheduled date >= CURRENT_DATE THEN
    NVL2(fod.actual date,
    cast(fod.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'planned' and
    fod.scheduled date is null THEN
    NVL2(fod.actual date,
    cast(fod.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'planned' and
    fod.scheduled date < CURRENT_DATE THEN
    NVL2(fod.actual date,
    cast(fod.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'planned' and
    fod.scheduled date >= CURRENT_DATE THEN
    NVL2(fod.actual date,
    cast(fod.actual date AS nvarchar2(30)),
    'N/A')
    end as DER_fod_ACT,
    /*lo*/
    case
    WHEN pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' OR
    pt.store status = 'Active' THEN
    NVL2(lo.scheduled date,
    cast(lo.scheduled date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'planned' THEN
    NVL2(lo.scheduled date,
    cast(lo.scheduled date AS nvarchar2(30)),
    'Null')
    end as DER_lo_SHC,
    case
    when pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' THEN
    NVL2(lo.actual date,
    cast(lo.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    lo.scheduled date is null THEN
    NVL2(lo.actual date,
    cast(lo.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    lo.scheduled date < CURRENT_DATE THEN
    NVL2(lo.actual date,
    cast(lo.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    lo.scheduled date >= CURRENT_DATE THEN
    NVL2(lo.actual date,
    cast(lo.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'planned' and
    lo.scheduled date is null THEN
    NVL2(lo.actual date,
    cast(lo.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'planned' and
    lo.scheduled date < CURRENT_DATE THEN
    NVL2(lo.actual date,
    cast(lo.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'planned' and
    lo.scheduled date >= CURRENT_DATE THEN
    NVL2(lo.actual date,
    cast(lo.actual date AS nvarchar2(30)),
    'N/A')
    end as DER_lo_ACT,
    /*lom*/
    case
    WHEN pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' OR
    pt.store status = 'Active' THEN
    NVL2(lom.scheduled date,
    cast(lom.scheduled date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'planned' THEN
    NVL2(lom.scheduled date,
    cast(lom.scheduled date AS nvarchar2(30)),
    'Null')
    end as DER_lom_SHC,
    case
    when pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' THEN
    NVL2(lom.actual date,
    cast(lom.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    lom.scheduled date is null THEN
    NVL2(lom.actual date,
    cast(lom.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    lom.scheduled date < CURRENT_DATE THEN
    NVL2(lom.actual date,
    cast(lom.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    lom.scheduled date >= CURRENT_DATE THEN
    NVL2(lom.actual date,
    cast(lom.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'planned' and
    lom.scheduled date is null THEN
    NVL2(lom.actual date,
    cast(lom.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'planned' and
    lom.scheduled date < CURRENT_DATE THEN
    NVL2(lom.actual date,
    cast(lom.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'planned' and
    lom.scheduled date >= CURRENT_DATE THEN
    NVL2(lom.actual date,
    cast(lom.actual date AS nvarchar2(30)),
    'N/A')
    end as DER_lom_ACT,
    /*lod*/
    case
    WHEN pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' OR
    pt.store status = 'Active' THEN
    NVL2(lod.scheduled date,
    cast(lod.scheduled date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'planned' THEN
    NVL2(lod.scheduled date,
    cast(lod.scheduled date AS nvarchar2(30)),
    'Null')
    end as DER_lod_SHC,
    case
    when pt.store status = 'Cancelled' OR
    pt.store status = 'Stopped' THEN
    cast('N/A' AS nvarchar2(30))
    WHEN pt.store status = 'Completed' THEN
    NVL2(lod.actual date,
    cast(lod.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    lod.scheduled date is null THEN
    NVL2(lod.actual date,
    cast(lod.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    lod.scheduled date < CURRENT_DATE THEN
    NVL2(lod.actual date,
    cast(lod.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'Active' and
    lod.scheduled date >= CURRENT_DATE THEN
    NVL2(lod.actual date,
    cast(lod.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'planned' and
    lod.scheduled date is null THEN
    NVL2(lod.actual date,
    cast(lod.actual date AS nvarchar2(30)),
    'N/A')
    when pt.store status = 'planned' and
    lod.scheduled date < CURRENT_DATE THEN
    NVL2(lod.actual date,
    cast(lod.actual date AS nvarchar2(30)),
    'Null')
    when pt.store status = 'planned' and
    lod.scheduled date >= CURRENT_DATE THEN
    NVL2(lod.actual date,
    cast(lod.actual date AS nvarchar2(30)),
    'N/A')
    end as DER_lod_ACT
    from
    product table pt,
    event table pr,
    event table pl,
    event table ps,
    event table fo,
    event table fb,
    event table fod,
    event table lo,
    event table lom,
    event table lod
    where
    pt.product code = pr.product code
    and pt.store code = pr.store code
    and pt.product code = pl.product code
    and pt.store code = pl.store code
    and pt.product code = fo.product code
    and pt.store code = fo.store code
    and pt.product code = fb.product code
    and pt.store code = fb.store code
    and pt.product code = fod.product code
    and pt.store code = fod.store code
    and pt.product code = lo.product code
    and pt.store code = lo.store code
    and pt.product code = lom.product code
    and pt.store code = lom.store code
    and pt.product code = lod.product code
    and pt.store code = lod.store code
    and pr.product code=pl.product code
    and pl.store code=ps.store code
    and ps.product code=fo.product code
    and fo.store code=fb.store code
    and fb.product code=fod.product code
    and fod.store code=lo.store code
    and lo.product code=lom.product code
    and lom.store code=lod.store code
    and pr.event code=1001
    and pl.event code=1002
    and ps.event code=1003
    and fo.event code=1004
    and fb.event code=1005
    and fod.event code=1006
    and lo.event code=1007
    and lom.event code=1008
    and lod.event code=1009
    order by product code,store code;
    THANKS IN ADVANCE FOR SPARING YOUR TIME IN UNDERSTANDING MY PROVLEM....
    REGARDS,
    MYTHRI.

    986300 wrote:
    from
    product table pt,
    event table pr,
    event table pl,
    event table ps,
    event table fo,
    event table fb,
    event table fod,
    event table lo,
    event table lom,
    event table lodabove is NOT valid SQL syntax

  • Help with bind variables

    Hello I'm new to .net and I'm trying to work with bind variables
    I keep getting the ORA-01036: illegal variable name/number error.
    here's my code, can somebody help me out and show me what am I doing wrong?
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim drLocation As OracleDataReader = getSCLocation("SOMEBODY")
    End Sub
    Private Function getSCLocation(ByVal contactName As String) As OracleDataReader
    Dim drLocation As OracleDataReader
    Dim connString As String = ConfigurationManager.ConnectionStrings("scConnString").ConnectionString
    Dim conn As New OracleConnection(connString)
    conn.Open()
    Dim queryString As String = "select a.location, a.location_name from locationm1 a where a.primary_contact_dept in (select b.dept from contactsm1 b where b.contact_name = p_contactName)"
    Dim p_contactName As New OracleParameter
    p_contactName.OracleType = OracleType.VarChar
    p_contactName.Value = contactName
    Dim cmdLocation As New OracleCommand(queryString, conn)
    cmdLocation.Parameters.Add(p_contactName)
    drLocation = cmdLocation.ExecuteReader(CommandBehavior.CloseConnection)
    Return drLocation
    End Function
    Thanks
    Peter

    never mind i got it by playing around with it
    had to change the way to start the bind variable
    Dim p_contactName As New OracleParameter("p_contactName", OracleType.VarChar)
    p_contactName.Size = 140
    p_contactName.Value = contactName

  • Need help with a variable

    I ahve a report that I want to show Free to Sell stock - stock that is in the warehouse that hasn't been allocated.
    I have created a variable called Freestock which basically uses a Physical Stock quantity minus the allocated stock quantity. 
    It is currently just adding all the figures together, instead of splitting it by item, so this is wrong
    Here's the formula I'm using ;
    =Sum(<Warehouse Physical Quantity>-<Outstanding Allocated Quantity>)
    Any help would be greatly appreciated in getting this sorted
    Thanks in advance

    George,
    I am sure the formula is correct.
    It is currently just adding all the figures together, instead of splitting it by item,
    You need to pull this variable with the item object. it will automatically break the number by the Item.
    Hope this helps.
    Kashif

  • Need help with accesing variable with xpath.

    Hi All,
    I need help with xpath in "Switch" BPEL construct. Switch is used to compare value assigned to output vairable and follow one path for "Deny" and another for "Approve". The following is data type for output variable.
    <element name="processResponse">
         <complexType>
              <sequence>
                   <element name="result" type="string"/>
              <sequence>
         <complexType>
    </element>
    The following expressions in Switch statement throw lava.lang.Exception. It error is xpath internal error".
    x20:compare('Deny',$outputvariable.payload/client:result)
    x20:compare('Deny',bpws:getVariableData('outputvariable','payload','/client:processResponse/client:result')
    It works with x20:compare('Deny','Deny'). So I assumed it must be accessing the variable.
    Any help greatly appreciated.
    Thanks,
    Satish

    Cany you try the following
    x20:compare('Deny',string($outputvariable.payload/client:result))
    x20:compare('Deny',string(bpws:getVariableData('outputvariable','payload','/client:processResponse/client:result'))
    Regards
    Albin I
    http://www.albinsblog.com/

  • Use of Bind Variable in the Query of view object giving null pointer excep

    I am using this code in the backing bean of my page to set the value of the bind variable 'cmdID' in the view object.
    String AM = "model.UnixCommandsAppMod";
    String CF = "UnixCommandsAppModLocal";
    ApplicationModule am = Configuration.createRootApplicationModule(AM, CF);
    ViewObject vo = am.findViewObject("Command_options_view");
    vo.setNamedWhereClauseParam("cmdID", 1);
    vo.executeQuery();
    On the fifth line it is giving NullPointer exception.
    I am not being able to figure out the reason.

    User,
    a). Don't keep posting new questions in the same thread. It really does decrease the usability of the forum. Now, if someone searches for "INFO: ADF Faces is running with time-stamp checking enabled," they will find a post about null pointer exception in a bind variable and think, "oh, that doesn't apply to me." If your question is answered, mark the answer as correct. New questions go into a new thread. Kind of funny that the thread I pointed you to with the answer to your question also has this same admonishment.. ;)
    b). I'll relent and answer your new question. Ignore that INFO message. It is not an error. It will ALWAYS ALWAYS appear when you run your application in the embedded OC4J with JDeveloper. Had you searched the forum for "INFO: ADF Faces is running with time-stamp checking enabled" you would find that the first hit (among some others) has this same answer
    John

Maybe you are looking for

  • XI 3.0 Mapping Failure

    Hello All, We are experiencing mapping errors we cannot seem to resolve.  Whether using straight Message Mapping or XSLT mapping imported as an archive, we receive the same error when processing a file.  We also see the same issue when running Flight

  • Distribution Rule in Incoming Payment of Invoice

    Hello Experts, I'm running SAP B1 8.81 PL05 and I have the following problem. I issue an A/R Invoice + Payment  and I have in the "Payment Means" a discount. The final result is an issue of two different journal entries - one for the invoice and anot

  • Won't backup, why!

    My IPad says it has not backed up. I tried but it won't, why?

  • Xml forms not rendered in default layout set - urgent

    Hi guys, I've to display several properties and to provide the rating and feedback service in conjunction with xml forms because a "NewsRenderer" doesn't support the display of additional properties. So I tried to use one of the default layout sets (

  • Question about burning speeds

    This has happened from new. As you see from my Mac Pro specs, it's not daft , but when I tell it to burn a DVD or CD at x4 which is my preferred speed (nice and safe) it ignores me and does it at x8-10 varying Importing CDs into itunes it gets up to