I am getting ORA-01008:not all variables bound error

Hi all,
i am getting ORA-01008:not all variables bound error while executing the following code...
Could any one help me to find out the problem...i am very new to ODP.net and Oracle ..
I am using VC++.net for run this code.
Here is the code.....
#include <iostream>
using namespace std;
using namespace System;
using namespace Oracle::DataAccess::Client;
class Sample
public:
     Sample();
~Sample();
Sample::Sample()
     int num = 100;
     int sal = 200;
//connect to Oracle
     OracleConnection ^con ;
     con = gcnew OracleConnection();
     con->ConnectionString = "User Id=test;Password=test;Data Source=test.local.com";
     //Oracle command part
     OracleCommand ^cmd;
     cmd = con->CreateCommand();
     cmd->CommandText = "insert into simple values (:num, :sal)";
     try
          con->Open();
          cmd->ExecuteNonQuery();
     catch (Exception ^e)
          Console::WriteLine("Execution Failed:" + e->Message);
finally
          con->Close();          
Sample::~Sample()
int main()
     Sample samp;
     return 0;
sorrry lack of comments.....
plz help me out..
thanks in advance..
justin

Hello,
You have 2 bind variables in your statement (:num and :sal) but you have not created parameters and bound them to the bind variables.
- Mark

Similar Messages

  • JBO-27122: SQL error during statement preparation IN OAF(java.sql.SQLException: ORA-01008: not all variables bound)

    Hi Friends,
    I have have extended CO where i have added dynamic where condition to VO,it's throwing error.
    Code added in controller :
    public class Custom_HomePageCO extends HomePageCO
      public Custom_HomePageCO()
    public void processRequest(OAPageContext pageContext,OAWebBean webBean)
      super.processRequest(pageContext,webBean);
      System.out.println("NewClase");
      OAApplicationModule am=pageContext.getApplicationModule(webBean);
      System.out.println(am);
      OAApplicationModule am1=(OAApplicationModule)am.findApplicationModule("TrackExpenseReportsAM");
    System.out.println(am1);
      OAViewObject vo=(OAViewObject)am1.findViewObject("TrackExpenseReportsVO");
      System.out.println(vo);
      vo.setWhereClause("REPORT_SUBMITTED_DATE is not null");
        vo.executeQuery();
    public void processFormRequest(OAPageContext pageContext,OAWebBean webBean)
      super.processFormRequest(pageContext,webBean);
    Error message:
    Exception Details.
    Error Details
           Logout
          Error Page
          Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation.  Statement: SELECT * FROM (SELECT
    AI.DESCRIPTION PURPOSE,
    AI.INVOICE_CURRENCY_CODE CURRENCY_CODE,
    AI.INVOICE_DATE REPORT_DATE,
    AERH.REPORT_SUBMITTED_DATE REPORT_SUBMITTED_DATE,
    AI.INVOICE_NUM REPORT_NUMBER,
    TO_CHAR(decode(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),
                     0, decode(AI.CANCELLED_DATE,
                                 null, APS.GROSS_AMOUNT,
                                 AERH.TOTAL),
                   nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)) ,  
            FND_CURRENCY_CACHE.GET_FORMAT_MASK
            (AI.INVOICE_CURRENCY_CODE, 30)) ||' '|| AI.INVOICE_CURRENCY_CODE REPORT_TOTAL_CURRENCY,
    TO_CHAR(decode(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),
                     0, decode(AI.CANCELLED_DATE,
                                 null, APS.GROSS_AMOUNT,
                                 AERH.TOTAL),
                   nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)) ,  
            FND_CURRENCY_CACHE.GET_FORMAT_MASK
            (AI.INVOICE_CURRENCY_CODE, 30))
    REPORT_TOTAL,
    P.PERSON_ID EMPLOYEE_ID,
    AERH.REPORT_HEADER_ID REPORT_HEADER_ID,
    P.FULL_NAME FULL_NAME ,
    DECODE(AI.CANCELLED_DATE,null,
                              nvl(aerh.expense_status_code, DECODE(APS.GROSS_AMOUNT ,0,'PAID',
                                    decode(AI.Payment_status_flag,'Y','PAID',
                                                            'N','INVOICED',
                                                            'P','PARPAID',NULL))),
                                            'CANCELLED') STATUS_CODE,
    AERH.source SOURCE,
    NULL CURRENT_APPROVER,
    ROUND(sysdate - AI.LAST_UPDATE_DATE) DAYS_SINCE_ACTIVITY,
    AERH.RECEIPTS_STATUS RECEIPTS_STATUS_CODE,
    AERH.HOLDING_REPORT_HEADER_ID,
    AI.VENDOR_ID VENDOR_ID,
    AERH.AMT_DUE_CCARD_COMPANY AMT_DUE_CCARD_COMPANY,
    AERH.AMT_DUE_EMPLOYEE AMT_DUE_EMPLOYEE,         
    'CurrentApproverName' CURRENT_APPROVER_SWITCHER,
    to_char(AERH.LAST_UPDATE_DATE, 'DD-MON-RRRR HH:MI:SS'),
    AI.INVOICE_ID INVOICE_ID
    FROM
           AK_WEB_USER_SEC_ATTR_VALUES A,
           PO_VENDORS PV,
           AP_INVOICES AI,
           AP_EXPENSE_REPORT_HEADERS AERH,
           PER_PEOPLE_X P,
           AP_PAYMENT_SCHEDULES APS
    WHERE  AI.INVOICE_ID= APS.INVOICE_ID
    AND    AI.INVOICE_ID = AERH.VOUCHNO(+)
    AND AI.INVOICE_TYPE_LOOKUP_CODE||'' = 'EXPENSE REPORT'
    AND A.ATTRIBUTE_CODE = 'ICX_HR_PERSON_ID'
    AND PV.EMPLOYEE_ID = A.NUMBER_VALUE
    AND A.WEB_USER_ID = :1
    AND P.PERSON_ID = PV.EMPLOYEE_ID
    AND PV.VENDOR_ID = AI.VENDOR_ID
    AND DECODE (AI.PAYMENT_STATUS_FLAG,
             'Y', sysdate - AI.LAST_UPDATE_DATE,
            decode(APS.GROSS_AMOUNT , 0 ,sysdate - AI.LAST_UPDATE_DATE,0)
              )  <= 30
    AND (AERH.SOURCE <> 'Both Pay' OR AERH.REPORT_HEADER_ID IS NULL)       
    UNION
    SELECT
    AI.DESCRIPTION PURPOSE,
    AI.INVOICE_CURRENCY_CODE CURRENCY_CODE,
    AI.INVOICE_DATE REPORT_DATE,
    AERH.REPORT_SUBMITTED_DATE REPORT_SUBMITTED_DATE,
    AI.INVOICE_NUM REPORT_NUMBER,
    TO_CHAR(decode(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),
                     0, decode(AI.CANCELLED_DATE,
                                 null, APS.GROSS_AMOUNT,
                                 AERH.TOTAL),
                   nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)) ,  
            FND_CURRENCY_CACHE.GET_FORMAT_MASK
            (AI.INVOICE_CURRENCY_CODE, 30)) ||' '|| AI.INVOICE_CURRENCY_CODE REPORT_TOTAL_CURRENCY,
    TO_CHAR(decode(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),
                     0, decode(AI.CANCELLED_DATE,
                                 null, APS.GROSS_AMOUNT,
                                 AERH.TOTAL),
                   nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)),  
            FND_CURRENCY_CACHE.GET_FORMAT_MASK
            (AI.INVOICE_CURRENCY_CODE, 30))
    REPORT_TOTAL,
    P.PERSON_ID EMPLOYEE_ID,
    AERH.REPORT_HEADER_ID REPORT_HEADER_ID,
    P.FULL_NAME FULL_NAME ,
    DECODE(AI.CANCELLED_DATE,null,
                              nvl(aerh.expense_status_code, DECODE(APS.GROSS_AMOUNT ,0,'PAID',
                                    decode(AI.Payment_status_flag,'Y','PAID',
                                                            'N','INVOICED',
                                                            'P','PARPAID',NULL))),
                                            'CANCELLED') STATUS_CODE,
    AERH.source SOURCE,
    NULL CURRENT_APPROVER,
    ROUND(sysdate - AI.LAST_UPDATE_DATE) DAYS_SINCE_ACTIVITY,
    AERH.RECEIPTS_STATUS RECEIPTS_STATUS_CODE,
    AERH.HOLDING_REPORT_HEADER_ID,
    AI.VENDOR_ID VENDOR_ID,
    AERH.AMT_DUE_CCARD_COMPANY AMT_DUE_CCARD_COMPANY,
    AERH.AMT_DUE_EMPLOYEE AMT_DUE_EMPLOYEE,         
    'CurrentApproverName' CURRENT_APPROVER_SWITCHER,
    to_char(AERH.LAST_UPDATE_DATE, 'DD-MON-RRRR HH:MI:SS'),
    AI.INVOICE_ID INVOICE_ID
    FROM
           AK_WEB_USER_SEC_ATTR_VALUES A,
           PO_VENDORS PV,
           AP_INVOICES AI,
           AP_EXPENSE_REPORT_HEADERS AERH,
           PER_PEOPLE_X P,
           AP_PAYMENT_SCHEDULES APS
    WHERE  AI.INVOICE_ID= APS.INVOICE_ID
    AND    AI.INVOICE_ID = AERH.VOUCHNO(+)
    AND AI.INVOICE_TYPE_LOOKUP_CODE||'' in ('STANDARD','MIXED')
    AND A.ATTRIBUTE_CODE = 'ICX_HR_PERSON_ID'
    AND AI.PAID_ON_BEHALF_EMPLOYEE_ID = A.NUMBER_VALUE
    AND A.WEB_USER_ID = :2
    AND P.PERSON_ID = AI.PAID_ON_BEHALF_EMPLOYEE_ID
    AND PV.VENDOR_ID = AI.VENDOR_ID
    AND DECODE (AI.PAYMENT_STATUS_FLAG,
             'Y', sysdate - AI.LAST_UPDATE_DATE,
            decode(APS.GROSS_AMOUNT , 0 ,sysdate - AI.LAST_UPDATE_DATE,0)
            ) <= 30
    AND (AERH.SOURCE <> 'Both Pay' OR AERH.REPORT_HEADER_ID IS NULL)            
    UNION ALL
    SELECT
    AERH.DESCRIPTION PURPOSE,
    AERH.DEFAULT_CURRENCY_CODE CURRENCY_CODE,
    AERH.WEEK_END_DATE REPORT_DATE,
    AERH.REPORT_SUBMITTED_DATE REPORT_SUBMITTED_DATE,
    AERH.INVOICE_NUM REPORT_NUMBER,
    TO_CHAR(nvl(AERH.AMT_DUE_CCARD_COMPANY+AERH.AMT_DUE_EMPLOYEE+nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),AERH.TOTAL),FND_CURRENCY_CACHE.GET_FORMAT_MASK
      (AERH.DEFAULT_CURRENCY_CODE,30)) ||' '|| AERH.DEFAULT_CURRENCY_CODE REPORT_TOTAL_CURRENCY,
    TO_CHAR(nvl(AERH.AMT_DUE_CCARD_COMPANY+AERH.AMT_DUE_EMPLOYEE+nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),AERH.TOTAL),FND_CURRENCY_CACHE.GET_FORMAT_MASK
      (AERH.DEFAULT_CURRENCY_CODE,30)) REPORT_TOTAL,
    PER_EMPLOYEE.PERSON_ID EMPLOYEE_ID,
    AERH.REPORT_HEADER_ID REPORT_HEADER_ID,
    PER_EMPLOYEE.FULL_NAME FULL_NAME,
    NVL(AERH.expense_status_code,
      AP_WEB_OA_ACTIVE_PKG.GetReportStatusCode(AERH.Source, AERH.Workflow_approved_flag,
      AERH.report_header_id, 'Y', 'N')) STATUS_CODE,
    AERH.source SOURCE,
    NVL (PER_APPROVER.full_name, AP_WEB_OA_ACTIVE_PKG.GetCurrentApprover(AERH.Source,
            AERH.Workflow_approved_flag, AERH.report_header_id, AERH.expense_status_code)) CURRENT_APPROVER,
    ROUND(NVL(sysdate - AERH.EXPENSE_LAST_STATUS_DATE,
              sysdate - AERH.LAST_UPDATE_DATE)) DAYS_SINCE_ACTIVITY,
    AERH.RECEIPTS_STATUS RECEIPTS_STATUS_CODE,
    AERH.HOLDING_REPORT_HEADER_ID,
    0 VENDOR_ID,
    AERH.AMT_DUE_CCARD_COMPANY AMT_DUE_CCARD_COMPANY,
    AERH.AMT_DUE_EMPLOYEE AMT_DUE_EMPLOYEE,  
    DECODE(AERH.expense_current_approver_id,
    -99999, 'AMEMultipleApprovers',
    decode(PER_APPROVER.full_name,
      null,'CurrentApproverName','AMESingleApprover')) CURRENT_APPROVER_SWITCHER,
    to_char(AERH.LAST_UPDATE_DATE, 'DD-MON-RRRR HH:MI:SS'),
    -1 INVOICE_ID
    FROM
           AK_WEB_USER_SEC_ATTR_VALUES A,
           AP_EXPENSE_REPORT_HEADERS AERH,
           PER_PEOPLE_X PER_EMPLOYEE,
           PER_PEOPLE_X PER_APPROVER
    WHERE  AERH.VOUCHNO +0 =0
    AND A.ATTRIBUTE_CODE = 'ICX_HR_PERSON_ID'
    AND AERH.EMPLOYEE_ID = A.NUMBER_VALUE
    AND A.WEB_USER_ID = :3
    AND PER_EMPLOYEE.PERSON_ID = AERH.EMPLOYEE_ID
    AND (AERH.Source <> 'NonValidatedWebExpense'
         OR AERH.Workflow_approved_flag IS NULL)
    AND AERH.expense_current_approver_id = PER_APPROVER.person_id
    AND decode(AERH.total,0,ROUND(NVL(sysdate - AERH.EXPENSE_LAST_STATUS_DATE,sysdate - AERH.LAST_UPDATE_DATE)),30) <= 30
    AND AERH.SOURCE <> 'Both Pay'
    UNION
    SELECT
    AERH.DESCRIPTION PURPOSE,
    AERH.DEFAULT_CURRENCY_CODE CURRENCY_CODE,
    AERH.WEEK_END_DATE REPORT_DATE,
    AERH.REPORT_SUBMITTED_DATE REPORT_SUBMITTED_DATE,
    AERH.INVOICE_NUM REPORT_NUMBER,
    TO_CHAR(nvl(AERH.AMT_DUE_CCARD_COMPANY+AERH.AMT_DUE_EMPLOYEE+nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),AERH.TOTAL),FND_CURRENCY_CACHE.GET_FORMAT_MASK
      (AERH.DEFAULT_CURRENCY_CODE,30)) ||' '|| AERH.DEFAULT_CURRENCY_CODE REPORT_TOTAL_CURRENCY,
    TO_CHAR(nvl(AERH.AMT_DUE_CCARD_COMPANY+AERH.AMT_DUE_EMPLOYEE+nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),AERH.TOTAL),FND_CURRENCY_CACHE.GET_FORMAT_MASK
      (AERH.DEFAULT_CURRENCY_CODE,30)) REPORT_TOTAL,
    PER_EMPLOYEE.PERSON_ID EMPLOYEE_ID,
    AERH.REPORT_HEADER_ID REPORT_HEADER_ID,
    PER_EMPLOYEE.FULL_NAME FULL_NAME,
    NVL(AERH.expense_status_code,
      AP_WEB_OA_ACTIVE_PKG.GetReportStatusCode(AERH.Source, AERH.Workflow_approved_flag,
      AERH.report_header_id,'Y','N')) STATUS_CODE,
    AERH.source SOURCE,
    NVL (PER_APPROVER.full_name, AP_WEB_OA_ACTIVE_PKG.GetCurrentApprover(AERH.Source,
            AERH.Workflow_approved_flag, AERH.report_header_id, AERH.expense_status_code)) CURRENT_APPROVER,
    ROUND(NVL(sysdate - AERH.EXPENSE_LAST_STATUS_DATE,
              sysdate - AERH.LAST_UPDATE_DATE)) DAYS_SINCE_ACTIVITY,
    AERH.RECEIPTS_STATUS RECEIPTS_STATUS_CODE,
    AERH.HOLDING_REPORT_HEADER_ID,
    0 VENDOR_ID,
    AERH.AMT_DUE_CCARD_COMPANY AMT_DUE_CCARD_COMPANY,
    AERH.AMT_DUE_EMPLOYEE AMT_DUE_EMPLOYEE,  
    DECODE(AERH.expense_current_approver_id,
    -99999, 'AMEMultipleApprovers',
    decode(PER_APPROVER.full_name,
      null,'CurrentApproverName','AMESingleApprover')) CURRENT_APPROVER_SWITCHER,
    to_char(AERH.LAST_UPDATE_DATE, 'DD-MON-RRRR HH:MI:SS'),
    -1 INVOICE_ID
    FROM
           AK_WEB_USER_SEC_ATTR_VALUES A,
           AP_EXPENSE_REPORT_HEADERS AERH,
           PER_PEOPLE_X PER_EMPLOYEE,
           PER_PEOPLE_X PER_APPROVER
    WHERE  AERH.VOUCHNO +0=0
    AND A.ATTRIBUTE_CODE = 'ICX_HR_PERSON_ID'
    AND AERH.PAID_ON_BEHALF_EMPLOYEE_ID = A.NUMBER_VALUE
    AND A.WEB_USER_ID = :4
    AND PER_EMPLOYEE.PERSON_ID = PAID_ON_BEHALF_EMPLOYEE_ID
    AND AERH.EMPLOYEE_ID IS NULL
    AND (AERH.Source <> 'NonValidatedWebExpense'
         OR AERH.Workflow_approved_flag IS NULL)
    AND AERH.expense_current_approver_id = PER_APPROVER.person_id
    AND decode(AERH.total,0,ROUND(NVL(sysdate - AERH.EXPENSE_LAST_STATUS_DATE,sysdate - AERH.LAST_UPDATE_DATE)),30) <= 30
    AND AERH.SOURCE <> 'Both Pay'
    UNION ALL
    /* This select is for invoice imported reports by contingent workers */
    SELECT
    AI.DESCRIPTION PURPOSE,
    AI.INVOICE_CURRENCY_CODE CURRENCY_CODE,
    AI.INVOICE_DATE REPORT_DATE,
    AERH.REPORT_SUBMITTED_DATE REPORT_SUBMITTED_DATE,
    AI.INVOICE_NUM REPORT_NUMBER,
    TO_CHAR(decode(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),
                     0, decode(AI.CANCELLED_DATE,
                                 null, APS.GROSS_AMOUNT,
                                 AERH.TOTAL),
                   nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)) ,  
            FND_CURRENCY_CACHE.GET_FORMAT_MASK
            (AI.INVOICE_CURRENCY_CODE, 30)) ||' '|| AI.INVOICE_CURRENCY_CODE REPORT_TOTAL_CURRENCY,
    TO_CHAR(decode(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),
                     0, decode(AI.CANCELLED_DATE,
                                 null, APS.GROSS_AMOUNT,
                                 AERH.TOTAL),
                   nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)) ,  
            FND_CURRENCY_CACHE.GET_FORMAT_MASK
            (AI.INVOICE_CURRENCY_CODE, 30))
    REPORT_TOTAL,
    P.PERSON_ID EMPLOYEE_ID,
    AERH.REPORT_HEADER_ID REPORT_HEADER_ID,
    P.FULL_NAME FULL_NAME ,
    DECODE(AI.CANCELLED_DATE,null,
                              nvl(aerh.expense_status_code, DECODE(APS.GROSS_AMOUNT ,0,'PAID',
                                    decode(AI.Payment_status_flag,'Y','PAID',
                                                            'N','INVOICED',
                                                            'P','PARPAID',NULL))),
                                            'CANCELLED') STATUS_CODE,
    AERH.source SOURCE,
    NULL CURRENT_APPROVER,
    ROUND(sysdate - AI.LAST_UPDATE_DATE) DAYS_SINCE_ACTIVITY,
    AERH.RECEIPTS_STATUS RECEIPTS_STATUS_CODE,
    AERH.HOLDING_REPORT_HEADER_ID,
    AI.VENDOR_ID VENDOR_ID,
    AERH.AMT_DUE_CCARD_COMPANY AMT_DUE_CCARD_COMPANY,
    AERH.AMT_DUE_EMPLOYEE AMT_DUE_EMPLOYEE,          
    'CurrentApproverName' CURRENT_APPROVER_SWITCHER,
    to_char(AERH.LAST_UPDATE_DATE, 'DD-MON-RRRR HH:MI:SS'),
    AI.INVOICE_ID INVOICE_ID
    FROM
           AK_WEB_USER_SEC_ATTR_VALUES A,
           AP_INVOICES AI,
           AP_EXPENSE_REPORT_HEADERS AERH,
           PER_PEOPLE_X P,
           AP_PAYMENT_SCHEDULES APS
    WHERE  AI.INVOICE_ID= APS.INVOICE_ID
    AND    AI.INVOICE_ID = AERH.VOUCHNO(+)
    AND AI.INVOICE_TYPE_LOOKUP_CODE||'' = 'EXPENSE REPORT'
    AND A.ATTRIBUTE_CODE = 'ICX_HR_PERSON_ID'
    AND AI.PAID_ON_BEHALF_EMPLOYEE_ID = A.NUMBER_VALUE
    AND A.WEB_USER_ID = :5
    AND P.PERSON_ID = AI.PAID_ON_BEHALF_EMPLOYEE_ID
    AND AP_WEB_DB_HR_INT_PKG.IsPersonCwk(AI.PAID_ON_BEHALF_EMPLOYEE_ID)='Y'
    AND DECODE (AI.PAYMENT_STATUS_FLAG,
             'Y', sysdate - AI.LAST_UPDATE_DATE,
            decode(APS.GROSS_AMOUNT , 0 ,sysdate - AI.LAST_UPDATE_DATE,0)
              )  <= 30
    AND (AERH.SOURCE <> 'Both Pay' OR AERH.REPORT_HEADER_ID IS NULL)) QRSLT  WHERE (REPORT_SUBMITTED_DATE is not null)
    at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:603)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
    at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
    at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2360)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1759)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:511)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:432)
    at _OA._jspService(OA.jsp:33)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
    at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01008: not all variables bound
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:583)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2548)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2933)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:650)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:578)
    at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:631)
    at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:518)
    at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3375)
    at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:828)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4525)
    at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:574)
    at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:544)
    at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:619)
    at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3339)
    at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3326)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:441)
    at oracle.apps.ap.oie.webui.Custom_HomePageCO.processRequest(Custom_HomePageCO.java:26)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
    at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
    at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2360)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1759)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:511)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:432)
    at _OA._jspService(OA.jsp:33)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
    at java.lang.Thread.run(Thread.java:534)
    java.sql.SQLException: ORA-01008: not all variables bound
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:583)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2548)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2933)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:650)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:578)
    at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:631)
    at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:518)
    at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3375)
    at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:828)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4525)
    at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:574)
    at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:544)
    at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:619)
    at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3339)
    at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3326)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:441)
    at oracle.apps.ap.oie.webui.Custom_HomePageCO.processRequest(Custom_HomePageCO.java:26)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
    at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
    at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2360)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1759)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:511)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:432)
    at _OA._jspService(OA.jsp:33)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
    at java.lang.Thread.run(Thread.java:534)
    I have took the sql from error message and i tried executing the same in toad... i was able execute it smoothly... i dot know why its working while running the page
    Please help me guys...
    Thanks,
    Pavan

    Hi Shobhi,
    Actually this relates to the Iexpenese Module. The VO is "oracle.apps.ap.oie.server.TrackExpenseReportsVO"(Seeded)
    The user Expense home screen is based on the above VO and this view returning multiple line for the same expense number which should be eliminated.
    so for this i need to filter data by adding where clause dynamically on top of the existing where conditions so that i can eliminate the duplicate row.
    Please suggest me !! how to move on
    Thanks,
    Pavan V
    91-9640871542

  • Why does this cause error (ORA 01008: Not all variables bound)

    When I assign values to parameters for a command object, I used the following code with the .NET provider:
    If oReq.CritSpec = Nothing Or oReq.CritSpec = "" Then
    cmdReq.Parameters.Add(":po5", DBNull.Value)
    Else
    cmdReq.Parameters.Add(":po5", oReq.CritSpec)
    End If
    This works fine, but when I switch to using ODP it generates the 'not all variables bound' error. I checked the parameter's status and it was Success. However, if I change the second line of the statement to
    If oReq.CritSpec = Nothing Or oReq.CritSpec = "" Then
    cmdReq.Parameters.Add(":po5", OracleDbType.Varchar2, DBNull.Value, ParameterDirection.Input)
    Else
    cmdReq.Parameters.Add(":po5", nReq.CritSpec)
    End If
    It seems to be OK. So my question is - why does the first statement generate the error? Am I misinterpreting the overloaded constructor or it it a bug in my code? Thanks.
    ck

    No need to answer, I solved it.
    For anyone else who might run into this, there were two issues:
    1. Assigning DBNull.Value to a parameter without specifying the parameter's type causes the Value property for that parameter to not be initialized. If you reference it, it will come back as a runtime error (check it first by testing for IsNot Nothing).
    2. In my update code, I have a lot of where clauses like "WHERE (COL1 = :1 OR COL1 IS NULL AND :1 IS NULL)". The default binding for parameters treats these two references to :1 as two different parameters. Setting BindByName to true solves the problem.
    ck
    Edited by: user536671 on Feb 15, 2009 7:04 PM

  • Bug? ORA-01008: not all variables bound when using DB LINK

    This SQL runs fine in SQL*Plus but returns ORA-01008 in Apex.
    If I replace the bind variable with a literal, it works fine in Apex.
    Using OracleXE 10.2.0.1.0, Apex 2.1.0.00.39
    with ixc as (
         select ic.table_name, ic.index_name, ic.column_name, ic.column_position
         from user_indexes@MY_DB_LINK ix
         join user_ind_columns@MY_DB_LINK ic
         on   (
              ic.index_name    = ix.index_name
              and
              ic.table_name     = ix.table_name
    select
      pk.table_name as pk_table
    , fk.table_name as fk_table
    , ucc.position
    , ucc.column_name
    , nvl(ixc.index_name,'-- not indexed --') as indexed
    , ixc.column_position as ind_position
    from (select table_name, owner, constraint_name, r_constraint_name, r_owner from user_constraints@MY_DB_LINK) fk
    join (select table_name, owner, constraint_name from user_constraints@MY_DB_LINK) pk
    on   (
         fk.r_owner = pk.owner
         and
         fk.r_constraint_name = pk.constraint_name
    join user_cons_columns@MY_DB_LINK ucc
    on   (
         ucc.owner           = fk.owner
         and
         ucc.constraint_name = fk.constraint_name
         and
         ucc.table_name      = fk.table_name
    left join ixc
    on   (
         ixc.column_name = ucc.column_name
         and
         ixc.table_name  = fk.table_name
    where pk.table_name like upper(:P11_TABLE_NAME)
    order by pk.table_name, fk.table_name, index_name, ucc.position

    one small advice....
    SQL95 semantics is something that is new in Oracle (from 9 version)....so maybe if you try to write your query with standard "=" "=+" join signs...
    I know that if that is part of universal app (SQL comaptible) that soem aditional problems may occure...but just try and look at the result...

  • Java.sql.SQLException: ORA-01008: not all variables bound

    Hi
    I have a custom search results page, in the search region user would select a supplier and then searches for the invoices of that supplier by entering the partial value for invoice field, but when i click on invoice LOV i am getting below error.
    i am not sure why the system is adding bind variables :3 to :7, please let me know any pointers to resolve the error.
    Note: dynamically i am setting the bind variables :1 and :2 but its failing because of the other system added bind variables.
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (select invoice_number,supplier_number,supplier_site,invoice_amount,null invoice_date,null Source,'Invoices' record_location
    from audit_invoices
    where invoice_number like :1
    and supplier_number = :2
    union all
    select invoice_num,vendor_num,vendor_site_code,invoice_amount,invoice_date,null Source,'InvoiceIT' record_location
    from xxit3_invoices
    where invoice_num like :1
    and vendor_num = :2
    union all
    select ai.invoice_num,pv.segment1 sup_number,pvs.vendor_site_code,ai.invoice_amount,ai.invoice_date,ai.source,'Payables' record_location
    from ap_invoices_all ai,po_vendor_sites_all pvs,po_vendors pv
    where invoice_num like :1
    and ai.vendor_id = pv.vendor_id
    and ai.vendor_site_id = pvs.vendor_site_id
    and pv.segment1 = :2) QRSLT WHERE (( UPPER(INVOICE_NUMBER) like :3 AND (INVOICE_NUMBER like :4 OR INVOICE_NUMBER like :5 OR INVOICE_NUMBER like :6 OR INVOICE_NUMBER like :7)))
    at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1408)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormData(OAPageBean.java:2555)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1677)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430)
         at OA.jspService(OA.jsp:33)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    Rgds,
    -kamal

    // Repeated Due to Network Issue.
    Kamal,
    Replace your VO with the following
    * select invoice_number,supplier_number,supplier_site,invoice_amount,null invoice_date,null Source,'Invoices' record_location
    from audit_invoices
    where invoice_number like :1
    and supplier_number = :2
    union all
    select invoice_num,vendor_num,vendor_site_code,invoice_amount,invoice_date,null Source,'InvoiceIT' record_location
    from xxit3_invoices
    where invoice_num like :3
    and vendor_num = :4
    union all
    select ai.invoice_num,pv.segment1 sup_number,pvs.vendor_site_code,ai.invoice_amount,ai.invoice_date,ai.source,'Payables' record_location
    from ap_invoices_all ai,po_vendor_sites_all pvs,po_vendors pv
    where invoice_num like :5
    and ai.vendor_id = pv.vendor_id
    and ai.vendor_site_id = pvs.vendor_site_id
    and pv.segment1 = :6 *
    Even though your Bind variable are same but in VO you have to pass the parameter for all the above like above.
    And set the whereclause based on the value required in parameter and the others as null.
    Hope you got it.
    Regards,
    Gyan

  • ORA-01008: not all variables bound - not because of '--'

    Hi,
    I am getting the dreaded bind variable error on a SQL statement in my applicaiton. Interestingly, it also happens from the SQL Command windows also.
    The query is based on a view, the first query in the app to do so. It is using simple bind variables as search criteria. I am on HTMLDB 2.0. Can anyone shed some ligh on whey I should be experiencing this? Is there something about parsing a query based on a view that I need to be aware of? Thanks in advance for any help.
    The queryis :
    select dock,
    v.customer,
    to_char(bl_date,'dd-Mon-yyyy') as "BL DATE",
    vessel,
    tank_type,
    sum("PROPANE(BBLS)") as "PROPANE(BBLS)",
    sum("BUTANE(BBLS)") as "BUTANE(BBLS)",
    sum("GASOLINE(BBLS)") as "GASOLINE(BBLS)",
    round(max(laytime),2) as "LAYTIME",
    round(max(turnaround_hours),2) as "TURNAROUND(HRS)",
    round(max(turnaround_hours)/(sum("PROPANE(BBLS)")+sum("BUTANE(BBLS)")+sum("GASOLINE(BBLS)"))*1000,2) as "HRS/'000 BBLS",
    :P90_FROM_DATE,
    :P90_TO_DATE,
    :p90_CUSTOMER_SEARCH
    from turnaround_stats_vw v
    where v.customer like '%'||:P90_CUSTOMER_SEARCH||'%'
    and bl_date between NVL(to_date(:P90_from_date,'dd-mm-yyyy'),bl_date)
    and NVL(to_date(:P90_to_date,'dd-mm-yyyy'),bl_date)
    group by dock,customer,bl_date,arrival_date;
    Noticed I tried the select :param as I saw in several posts relating to this issue, but to no avail.
    The view query is:
    REATE OR REPLACE FORCE VIEW "TURNAROUND_STATS_VW" ("SHIPMENT_NUMBER", "CUSTOMER", "VESSEL", "TANK_TYPE", "BL_NO", "BL_DATE", "DOCK", "PROPANE(BBLS)", "BUTANE(BBLS)", "GASOLINE(BBLS)", "ARRIVAL_DATE_AND_TIME", "NOR_TENDERED", "PILOT_ON_BOARD", "ALL_FAST", "NOR_ACCEPTED", "ARM_CONNECTED", "LOADING_COMMENCED", "LOADING_COMPLETED", "ARM_DISCONNECTED", "VESSEL_UNBERTHED", "VESSEL_SAILED", "REMARKS", "LAYTIME", "TURNAROUND_HOURS", "EFFECTIVE_LOADING_RATE", "TURNAROUND/000_BBL", "TRANSIT_TIME") AS
    SELECT s.Shipment_Number,
    c.Customer_Name as "CUSTOMER",
    v.Vessel_Name as "VESSEL",
    vtt.Description as "TANK_TYPE",
    s.BL_NO,
    s.BL_Date,
    d.description as "DOCK",
    s.propane as "PROPANE(BBLS)",
    s.butane as "BUTANE(BBLS)",
    s.gasoline as "GASOLINE(BBLS)",
    to_char(s.Arrival_Date_Time,'DD-Mon-YYYY HH24:MI') as "ARRIVAL_DATE_AND_TIME",
    to_char(s.NOR_Tendered,'DD-Mon-YYYY HH24:MI') as "NOR_TENDERED",
    to_char(s.Pilot_on_Board,'DD-Mon-YYYY HH24:MI') as "PILOT_ON_BOARD",
    to_char(s.All_Fast,'DD-Mon-YYYY HH24:MI') as "ALL_FAST",
    to_char(s.NOR_Accepted,'DD-Mon-YYYY HH24:MI') as "NOR_ACCEPTED",
    to_char(s.Arm_Connected,'DD-Mon-YYYY HH24:MI') as "ARM_CONNECTED",
    to_char(s.Loading_Commenced,'DD-Mon-YYYY HH24:MI') as "LOADING_COMMENCED",
    to_char(s.Loading_Completed,'DD-Mon-YYYY HH24:MI') as "LOADING_COMPLETED",
    to_char(s.Arm_Disconnected,'DD-Mon-YYYY HH24:MI') as "ARM_DISCONNECTED",
    to_char(s.Vessel_Unberthed,'DD-Mon-YYYY HH24:MI') as "VESSEL_UNBERTHED",
    to_char(s.Vessel_Sailed,'DD-Mon-YYYY HH24:MI') as "VESSEL_SAILED",
    s.Remarks,
    (CASE
    WHEN s.all_fast < (s.nor_accepted + 0.25)
    THEN (s.arm_disconnected - s.all_fast) * 24
    ELSE (s.arm_disconnected - (nor_accepted + 0.25)) * 24
    END) as "LAYTIME",
    (s.Vessel_Sailed - s.Arrival_Date_Time)*24 AS "TURNAROUND_HOURS",
    (s.Propane + s.Butane+ s.Gasoline)/((s.Loading_Completed - s.Loading_Commenced)*24) AS "EFFECTIVE_LOADING_RATE",
    ((s.Vessel_Sailed - s.Arrival_Date_Time) * 24)/(s.Propane + s.Butane + s.Gasoline)*1000 AS "TURNAROUND/000_BBL",
    ((s.Vessel_Sailed - s.Arm_Disconnected) + (s.Arm_Connected - s.Arrival_Date_Time))*24 AS "TRANSIT_TIME"
    FROM Shipments s,
    Vessels v,
    Docks d,
    Customers c,
    Vessel_Tank_Types vtt
    WHERE s.shipment_status = 'Closed'
    AND s.customer_id = c.customer_id
    AND s.vessel_id = v.vessel_id
    AND v.tank_type_id = vtt.tank_type_id
    AND s.dock_id = d.dock_id
    /

    Here re some further observations:
    If I remove all references to the :P90_X fields in the query, it will work albeit with no criteria.
    If I do select ":p_90_from_date from dual;" in a test region on the same report page, it works. Seems to be pointing to something with the view. I have since removed the column name references such as porpane(bbls) to propane_bbls in case it was the non standard Oracle column names creating the issue. No change.

  • Error ORA-01008: Not all variables bound

    SELECT
    MAX((SELECT TO_CHAR(MAX(a.order_number)) FROM oe_order_headers_All a WHERE a.cust_po_number=ct.purchase_order)) AS order_number1,  
         MAX(DECODE(CT.PREVIOUS_CUSTOMER_TRX_ID,NULL,ct.interface_header_attribute1,(SELECT ct1.interface_header_attribute1
                                                                   FROM  ra_customer_trx_all CT1
                                       WHERE CT1.CUSTOMER_TRX_ID = CT.PREVIOUS_CUSTOMER_TRX_ID))) AS ORDER_NUMBER,
    0 AS order_value,
    NVL(ct.purchase_order,SU.LOCATION) purchase_order,
        (SELECT SUM(L.ORDERED_QUANTITY*L.UNIT_SELLING_PRICE)
        FROM oe_order_lines_all l,
           oe_order_headers_all h
      WHERE l.header_id = h.header_id
      AND h.order_number IN (SELECT MAX(a.order_number) FROM oe_order_headers_All a WHERE a.cust_po_number=ct.purchase_order)) AS order_value1,                          
    null AS CONTRACT_START_DATE,
    (SELECT MIN(TRUNC(TO_DATE(l.Attribute14), 'DD'))
        FROM oe_order_lines_all l,
           oe_order_headers_all h
      WHERE l.header_id = h.header_id
      AND h.order_number IN (SELECT MAX(a.order_number) FROM oe_order_headers_All a WHERE a.cust_po_number=ct.purchase_order)) AS CONTRACT_START_DATE1,
    null AS CONTRACT_END_DATE,
       (SELECT MAX(TRUNC(TO_DATE(l.Attribute14), 'DD'))
        FROM oe_order_lines_all l,
           oe_order_headers_all h
      WHERE l.header_id = h.header_id
      AND h.order_number IN (SELECT MAX(a.order_number) FROM oe_order_headers_All a WHERE a.cust_po_number=ct.purchase_order)) AS CONTRACT_END_DATE1,                            
            CUST_ACCT.ACCOUNT_NUMBER,
              SUBSTRB(party.party_name,1,50) Cust_name,
              SU.LOCATION AS MID,
              PS.TRX_NUMBER AS INVOICE_NUM,
              PS.TRX_DATE AS INVOICE_DATE,
              PS.AMOUNT_DUE_ORIGINAL AS INVOICE_VALUE,
              ctt.description,
              CT.PREVIOUS_CUSTOMER_TRX_ID,
              CT.CUSTOMER_TRX_ID,
    ((SELECT NVL( SUM ( DECODE
                       ( 'Y', 'Y',
                          (DECODE(ps9.CLASS, 'CM',
                                       DECODE ( ra9.application_type, 'CM',
                                                 ra9.acctd_amount_applied_from,
                                                 ra9.acctd_amount_applied_to),
                                       ra9.acctd_amount_applied_to) +
                            NVL(ra9.acctd_earned_discount_taken,0) +
                           NVL(ra9.acctd_unearned_discount_taken,0) ),
                         ( ra9.amount_applied +
                           NVL(ra9.earned_discount_taken,0) +
                           NVL(ra9.unearned_discount_taken,0) )
                       DECODE
                       ( ps9.CLASS, 'CM',
                         DECODE(ra9.application_type, 'CM', -1, 1), 1 )
                    ), 0 )
        FROM  ar_receivable_applications ra9,
                ar_cash_receipt_history crh9,
               ar_payment_schedules ps9
        WHERE (ra9.applied_payment_schedule_id = PS.PAYMENT_SCHEDULE_ID
                   OR
                   ra9.payment_schedule_id = PS.PAYMENT_SCHEDULE_ID)
       AND   ra9.status||'' = 'APP'
            AND   ra9.cash_receipt_history_id = crh9.cash_receipt_history_id(+)
            AND   (crh9.reversal_gl_date IS NULL
                   OR crh9.reversal_gl_date+0 > TO_DATE(:SYSDATE1,'DD-MON-YY'))
        AND   NVL( ra9.confirmed_flag, 'Y' ) = 'Y'
        AND   ra9.gl_date+0 > TO_DATE(:SYSDATE1,'DD-MON-YY')
        AND   ps9.payment_schedule_id = PS.PAYMENT_SCHEDULE_ID
       )) + PS.AMOUNT_DUE_REMAINING AMOUNT_DUE_REMAINING,
       PS.CUSTOMER_TRX_ID AS PS_CUSTOMER_TRX_ID,
       PS.CUST_TRX_TYPE_ID,
       PS.CUSTOMER_ID,
       PS.CUSTOMER_SITE_USE_ID,
       AR1.RECEIPT_NUMBER,
       AR1.AMOUNT_APPLIED,
       AR1.APPLY_DATE,
       ct.interface_header_attribute1,
        CASE
    WHEN (( ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) >=1 )  AND  (ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) <= 30 ))
    THEN '  1 - 30  Days Due'
    WHEN ((ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0)  >= 31) AND  (ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) <= 60) )
    THEN ' 31 - 60  Days Due'
    WHEN ((ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0)  >= 61) AND  (ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) <= 90 ))
    THEN ' 61 - 90  Days Due'
    WHEN ((ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0)  >= 91) AND  (ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) <= 180 ))
    THEN ' 91 - 180 Days Due'
    WHEN ((ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0)  >= 181) AND  (ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) <= 360 ))
    THEN '181 - 360 Days Due'
    WHEN ((ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0)  >= 361) )
    THEN '361+ Days Due'
    ELSE 'Current'
    END AS aging,
    NULL cash_receipt_id,
    AR1.GL_POSTED_DATE,
    CASE
    WHEN (( ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) >=1 )  AND  (ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) <= 30 ))
    THEN
    NULL
    WHEN ((ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0)  >= 31) AND  (ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) <= 60) )
    THEN
    NULL
    WHEN ((ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0)  >= 61) AND  (ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) <= 90 ))
    THEN
    NULL
    WHEN ((ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0)  >= 91) AND  (ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) <= 180 ))
    THEN
    NULL
    WHEN ((ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0)  >= 181) AND  (ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) <= 360 ))
    THEN
    NULL
    WHEN ((ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0)  >= 361) )
    THEN
    NULL
    ELSE
    ((SELECT NVL( SUM ( DECODE
                       ( 'Y', 'Y',
                          (DECODE(ps9.CLASS, 'CM',
                                       DECODE ( ra9.application_type, 'CM',
                                                 ra9.acctd_amount_applied_from,
                                                 ra9.acctd_amount_applied_to),
                                       ra9.acctd_amount_applied_to) +
                            NVL(ra9.acctd_earned_discount_taken,0) +
                           NVL(ra9.acctd_unearned_discount_taken,0) ),
                         ( ra9.amount_applied +
                           NVL(ra9.earned_discount_taken,0) +
                           NVL(ra9.unearned_discount_taken,0) )
                       DECODE
                       ( ps9.CLASS, 'CM',
                         DECODE(ra9.application_type, 'CM', -1, 1), 1 )
                    ), 0 )
        FROM  ar_receivable_applications ra9,
                ar_cash_receipt_history crh9,
               ar_payment_schedules ps9
        WHERE (ra9.applied_payment_schedule_id = PS.PAYMENT_SCHEDULE_ID
                   OR
                   ra9.payment_schedule_id = PS.PAYMENT_SCHEDULE_ID)
       AND   ra9.status||'' = 'APP'
            AND   ra9.cash_receipt_history_id = crh9.cash_receipt_history_id(+)
            AND   (crh9.reversal_gl_date IS NULL
                   OR crh9.reversal_gl_date+0 > TO_DATE(:SYSDATE1,'DD-MON-YY'))
        AND   NVL( ra9.confirmed_flag, 'Y' ) = 'Y'
        AND   ra9.gl_date+0 > TO_DATE(:SYSDATE1,'DD-MON-YY')
        AND   ps9.payment_schedule_id = PS.PAYMENT_SCHEDULE_ID
       )) + PS.AMOUNT_DUE_REMAINING
    END AS Current_AGE,
    CASE
    WHEN (( ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) >=1 )  AND  (ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) <= 30 ))
    THEN
    ((SELECT NVL( SUM ( DECODE
                       ( 'Y', 'Y',
                          (DECODE(ps9.CLASS, 'CM',
                                       DECODE ( ra9.application_type, 'CM',
                                                 ra9.acctd_amount_applied_from,
                                                 ra9.acctd_amount_applied_to),
                                       ra9.acctd_amount_applied_to) +
                            NVL(ra9.acctd_earned_discount_taken,0) +
                           NVL(ra9.acctd_unearned_discount_taken,0) ),
                         ( ra9.amount_applied +
                           NVL(ra9.earned_discount_taken,0) +
                           NVL(ra9.unearned_discount_taken,0) )
                       DECODE
                       ( ps9.CLASS, 'CM',
                         DECODE(ra9.application_type, 'CM', -1, 1), 1 )
                    ), 0 )
        FROM  ar_receivable_applications ra9,
                ar_cash_receipt_history crh9,
               ar_payment_schedules ps9
        WHERE (ra9.applied_payment_schedule_id = PS.PAYMENT_SCHEDULE_ID
                   OR
                   ra9.payment_schedule_id = PS.PAYMENT_SCHEDULE_ID)
       AND   ra9.status||'' = 'APP'
            AND   ra9.cash_receipt_history_id = crh9.cash_receipt_history_id(+)
            AND   (crh9.reversal_gl_date IS NULL
                   OR crh9.reversal_gl_date+0 > TO_DATE(:SYSDATE1,'DD-MON-YY'))
        AND   NVL( ra9.confirmed_flag, 'Y' ) = 'Y'
        AND   ra9.gl_date+0 > TO_DATE(:SYSDATE1,'DD-MON-YY')
        AND   ps9.payment_schedule_id = PS.PAYMENT_SCHEDULE_ID
       )) + PS.AMOUNT_DUE_REMAINING
    END AS S30_Days,
    CASE
    WHEN ((ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0)  >= 31) AND  (ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) <= 60) )
    THEN
    ((SELECT NVL( SUM ( DECODE
                       ( 'Y', 'Y',
                          (DECODE(ps9.CLASS, 'CM',
                                       DECODE ( ra9.application_type, 'CM',
                                                 ra9.acctd_amount_applied_from,
                                                 ra9.acctd_amount_applied_to),
                                       ra9.acctd_amount_applied_to) +
                            NVL(ra9.acctd_earned_discount_taken,0) +
                           NVL(ra9.acctd_unearned_discount_taken,0) ),
                         ( ra9.amount_applied +
                           NVL(ra9.earned_discount_taken,0) +
                           NVL(ra9.unearned_discount_taken,0) )
                       DECODE
                       ( ps9.CLASS, 'CM',
                         DECODE(ra9.application_type, 'CM', -1, 1), 1 )
                    ), 0 )
        FROM  ar_receivable_applications ra9,
                ar_cash_receipt_history crh9,
               ar_payment_schedules ps9
        WHERE (ra9.applied_payment_schedule_id = PS.PAYMENT_SCHEDULE_ID
                   OR
                   ra9.payment_schedule_id = PS.PAYMENT_SCHEDULE_ID)
       AND   ra9.status||'' = 'APP'
            AND   ra9.cash_receipt_history_id = crh9.cash_receipt_history_id(+)
            AND   (crh9.reversal_gl_date IS NULL
                   OR crh9.reversal_gl_date+0 > TO_DATE(:SYSDATE1,'DD-MON-YY'))
        AND   NVL( ra9.confirmed_flag, 'Y' ) = 'Y'
        AND   ra9.gl_date+0 > TO_DATE(:SYSDATE1,'DD-MON-YY')
        AND   ps9.payment_schedule_id = PS.PAYMENT_SCHEDULE_ID
       )) + PS.AMOUNT_DUE_REMAINING
    END AS S31_60_Days,
    CASE
    WHEN ((ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0)  >= 61) AND  (ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) <= 90 ))
    THEN
    ((SELECT NVL( SUM ( DECODE
                       ( 'Y', 'Y',
                          (DECODE(ps9.CLASS, 'CM',
                                       DECODE ( ra9.application_type, 'CM',
                                                 ra9.acctd_amount_applied_from,
                                                 ra9.acctd_amount_applied_to),
                                       ra9.acctd_amount_applied_to) +
                            NVL(ra9.acctd_earned_discount_taken,0) +
                           NVL(ra9.acctd_unearned_discount_taken,0) ),
                         ( ra9.amount_applied +
                           NVL(ra9.earned_discount_taken,0) +
                           NVL(ra9.unearned_discount_taken,0) )
                       DECODE
                       ( ps9.CLASS, 'CM',
                         DECODE(ra9.application_type, 'CM', -1, 1), 1 )
                    ), 0 )
        FROM  ar_receivable_applications ra9,
                ar_cash_receipt_history crh9,
               ar_payment_schedules ps9
        WHERE (ra9.applied_payment_schedule_id = PS.PAYMENT_SCHEDULE_ID
                   OR
                   ra9.payment_schedule_id = PS.PAYMENT_SCHEDULE_ID)
       AND   ra9.status||'' = 'APP'
            AND   ra9.cash_receipt_history_id = crh9.cash_receipt_history_id(+)
            AND   (crh9.reversal_gl_date IS NULL
                   OR crh9.reversal_gl_date+0 > TO_DATE(:SYSDATE1,'DD-MON-YY'))
        AND   NVL( ra9.confirmed_flag, 'Y' ) = 'Y'
        AND   ra9.gl_date+0 > TO_DATE(:SYSDATE1,'DD-MON-YY')
        AND   ps9.payment_schedule_id = PS.PAYMENT_SCHEDULE_ID
       )) + PS.AMOUNT_DUE_REMAINING
    END AS S61_90_Days,
    CASE
    WHEN ((ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0)  >= 91) AND  (ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) <= 180 ))
    THEN
    ((SELECT NVL( SUM ( DECODE
                       ( 'Y', 'Y',
                          (DECODE(ps9.CLASS, 'CM',
                                       DECODE ( ra9.application_type, 'CM',
                                                 ra9.acctd_amount_applied_from,
                                                 ra9.acctd_amount_applied_to),
                                       ra9.acctd_amount_applied_to) +
                            NVL(ra9.acctd_earned_discount_taken,0) +
                           NVL(ra9.acctd_unearned_discount_taken,0) ),
                         ( ra9.amount_applied +
                           NVL(ra9.earned_discount_taken,0) +
                           NVL(ra9.unearned_discount_taken,0) )
                       DECODE
                       ( ps9.CLASS, 'CM',
                         DECODE(ra9.application_type, 'CM', -1, 1), 1 )
                    ), 0 )
        FROM  ar_receivable_applications ra9,
                ar_cash_receipt_history crh9,
               ar_payment_schedules ps9
        WHERE (ra9.applied_payment_schedule_id = PS.PAYMENT_SCHEDULE_ID
                   OR
                   ra9.payment_schedule_id = PS.PAYMENT_SCHEDULE_ID)
       AND   ra9.status||'' = 'APP'
            AND   ra9.cash_receipt_history_id = crh9.cash_receipt_history_id(+)
            AND   (crh9.reversal_gl_date IS NULL
                   OR crh9.reversal_gl_date+0 > TO_DATE(:SYSDATE1,'DD-MON-YY'))
        AND   NVL( ra9.confirmed_flag, 'Y' ) = 'Y'
        AND   ra9.gl_date+0 > TO_DATE(:SYSDATE1,'DD-MON-YY')
        AND   ps9.payment_schedule_id = PS.PAYMENT_SCHEDULE_ID
       )) + PS.AMOUNT_DUE_REMAINING
    END AS S91_180_Days,
    CASE
    WHEN ((ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0)  >= 181) AND  (ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0) <= 360 ))
    THEN
    ((SELECT NVL( SUM ( DECODE
                       ( 'Y', 'Y',
                          (DECODE(ps9.CLASS, 'CM',
                                       DECODE ( ra9.application_type, 'CM',
                                                 ra9.acctd_amount_applied_from,
                                                 ra9.acctd_amount_applied_to),
                                       ra9.acctd_amount_applied_to) +
                            NVL(ra9.acctd_earned_discount_taken,0) +
                           NVL(ra9.acctd_unearned_discount_taken,0) ),
                         ( ra9.amount_applied +
                           NVL(ra9.earned_discount_taken,0) +
                           NVL(ra9.unearned_discount_taken,0) )
                       DECODE
                       ( ps9.CLASS, 'CM',
                         DECODE(ra9.application_type, 'CM', -1, 1), 1 )
                    ), 0 )
        FROM  ar_receivable_applications ra9,
                ar_cash_receipt_history crh9,
               ar_payment_schedules ps9
        WHERE (ra9.applied_payment_schedule_id = PS.PAYMENT_SCHEDULE_ID
                   OR
                   ra9.payment_schedule_id = PS.PAYMENT_SCHEDULE_ID)
       AND   ra9.status||'' = 'APP'
            AND   ra9.cash_receipt_history_id = crh9.cash_receipt_history_id(+)
            AND   (crh9.reversal_gl_date IS NULL
                   OR crh9.reversal_gl_date+0 > TO_DATE(:SYSDATE1,'DD-MON-YY'))
        AND   NVL( ra9.confirmed_flag, 'Y' ) = 'Y'
        AND   ra9.gl_date+0 > TO_DATE(:SYSDATE1,'DD-MON-YY')
        AND   ps9.payment_schedule_id = PS.PAYMENT_SCHEDULE_ID
       )) + PS.AMOUNT_DUE_REMAINING
    END AS S181_360_Days,
    CASE
    WHEN ((ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0)  >= 361) )
    THEN
    ((SELECT NVL( SUM ( DECODE
                       ( 'Y', 'Y',
                          (DECODE(ps9.CLASS, 'CM',
                                       DECODE ( ra9.application_type, 'CM',
                                                 ra9.acctd_amount_applied_from,
                                                 ra9.acctd_amount_applied_to),
                                       ra9.acctd_amount_applied_to) +
                            NVL(ra9.acctd_earned_discount_taken,0) +
                           NVL(ra9.acctd_unearned_discount_taken,0) ),
                         ( ra9.amount_applied +
                           NVL(ra9.earned_discount_taken,0) +
                           NVL(ra9.unearned_discount_taken,0) )
                       DECODE
                       ( ps9.CLASS, 'CM',
                         DECODE(ra9.application_type, 'CM', -1, 1), 1 )
                    ), 0 )
        FROM  ar_receivable_applications ra9,
                ar_cash_receipt_history crh9,
               ar_payment_schedules ps9
        WHERE (ra9.applied_payment_schedule_id = PS.PAYMENT_SCHEDULE_ID
                   OR
                   ra9.payment_schedule_id = PS.PAYMENT_SCHEDULE_ID)
       AND   ra9.status||'' = 'APP'
            AND   ra9.cash_receipt_history_id = crh9.cash_receipt_history_id(+)
            AND   (crh9.reversal_gl_date IS NULL
                   OR crh9.reversal_gl_date+0 > TO_DATE(:SYSDATE1,'DD-MON-YY'))
        AND   NVL( ra9.confirmed_flag, 'Y' ) = 'Y'
        AND   ra9.gl_date+0 > TO_DATE(:SYSDATE1,'DD-MON-YY')
        AND   ps9.payment_schedule_id = PS.PAYMENT_SCHEDULE_ID
       )) + PS.AMOUNT_DUE_REMAINING
    END AS S361_plus_Days,
    PS.PAYMENT_SCHEDULE_ID
    FROM ar_lookups                 al_status,
       ar_collectors              ar_coll,
       ar_cons_inv_all            cons,
       ra_cust_trx_types_all          ctt,
       ra_batch_sources_all          bs,
       ra_customer_trx_all          ct,
       hz_cust_site_uses_all          su,
       hz_cust_accounts            cust_acct,
       hz_parties              party,
       ar_payment_schedules_all        ps,
       AR_RECEIVABLE_APPLICATIONS_V      ar1
    WHERE
    PS.CUSTOMER_ID                    = CUST_ACCT.CUST_ACCOUNT_ID        AND
    CUST_ACCT.PARTY_ID              = PARTY.PARTY_ID            AND
    PS.CUSTOMER_SITE_USE_ID          = SU.SITE_USE_ID            AND
    PS.CUSTOMER_TRX_ID              = CT.CUSTOMER_TRX_ID          AND
    CT.BATCH_SOURCE_ID              = BS.BATCH_SOURCE_ID          AND
    CT.CUST_TRX_TYPE_ID            = CTT.CUST_TRX_TYPE_ID          AND
    PS.STATUS                  = AL_STATUS.LOOKUP_CODE          AND
    AL_STATUS.LOOKUP_TYPE            = 'INVOICE_TRX_STATUS'          AND
    PS.COLLECTOR_LAST              = AR_COLL.COLLECTOR_ID (+)        AND
    PS.CONS_INV_ID                = CONS.CONS_INV_ID (+)          AND
    PS.STATUS                  = NVL(ARP_VIEW_CONSTANTS.GET_STATUS,PS.STATUS) AND
    su.site_use_code              = 'BILL_TO'                        AND
    SU.location                NOT LIKE '0%'                       AND
    SU.LOCATION NOT IN ('INTERCO') AND
    AR1.CUSTOMER_TRX_ID  (+)             =PS.CUSTOMER_TRX_ID                 AND
    AR1.CUST_TRX_TYPE_ID(+)             =PS.CUST_TRX_TYPE_ID               AND
    AR1.CUSTOMER_ID  (+)               =PS.CUSTOMER_ID                   AND
    AR1.BILL_TO_SITE_USE_ID  (+)          =PS.CUSTOMER_SITE_USE_ID             AND
    AR1.TRX_CLASS_CODE(+)           =PS.CLASS                     AND
    AR1.TRX_NUMBER(+)               =PS.TRX_NUMBER                   AND
    SU.ORG_ID =144
    --AR1.GL_POSTED_DATE <= TO_DATE(:SYSDATE1,'DD-MON-YY')
    --AND   ROUND((TO_DATE(:SYSDATE1,'DD-MON-YY') - ps.DUE_DATE),0)  >= 181
    --and PS.AMOUNT_DUE_REMAINING >0
    ----and SUBSTRB(party.party_name,1,50) like 'A%'
    --AND CUST_ACCT.ACCOUNT_NUMBER IN ( 6319)
    &LP_CUST_NO
    &LP_CUST_NAME
    AND PS.TRX_DATE < = TO_DATE(:SYSDATE1,'DD-MON-YY')
    GROUP BY CUST_ACCT.ACCOUNT_NUMBER,
        SUBSTRB(party.party_name,1,50),
        SU.LOCATION ,
         PS.TRX_NUMBER,
        PS.TRX_DATE,
        PS.AMOUNT_DUE_ORIGINAL,
        ctt.description,
        CT.PREVIOUS_CUSTOMER_TRX_ID,
        CT.CUSTOMER_TRX_ID,
        PS.AMOUNT_DUE_REMAINING,
        PS.CUSTOMER_TRX_ID,
           PS.CUST_TRX_TYPE_ID,
           PS.CUSTOMER_ID,
           PS.CUSTOMER_SITE_USE_ID,
          AR1.RECEIPT_NUMBER,
           AR1.AMOUNT_APPLIED,
           AR1.APPLY_DATE,
           ct.interface_header_attribute1,
           ct.purchase_order,
        AR1.GL_POSTED_DATE,
        ps.DUE_DATE,
        PS.PAYMENT_SCHEDULE_ID

    In that case do a quick replace of :SYSDATE1 as SYSDATE and try running it.

  • "not all variables bound" error in a BI publisher report

    Hi, I'm getting a "ORA-01008: not all variables bound" error in my BI publisher report. The SQL query looks like this:
    select
    ...--a bunch of rows
    from
    tbl1,tbl2,...,tblk
    where
    ...--and conditions performing inner joins
    and
    (('*') in &p_SomeParameter or tbl3.SomeValueOfSameType in &p_SomeParameter)
    Yet, when I comment out this last and condition, it works. Also, the default value for this parameter is ('*'). I get this error even when just trying to look the xml data itself. Has anyone seen "ORA-01008: not all variables bound" caused by a BI-Publisher report before?
    Why haven't I gotten a reply to this? Did I make myself clear enough? The query runs fine in Toad. Therefore this means that BI Publisher is mangling the query before it has a chance to be processed by the Oracle RDBMS. Therefore I want to know why BI Publisher is mangling my select query and causing the RDBMS to return a "not all variables bound" error.
    Message was edited by:
    user586835

    Try, (use ':' instead of '&')
    (('*') in :p_SomeParameter or tbl3.SomeValueOfSameType in :p_SomeParameter)
    )

  • ORA-01008 - not all variable bounfd when trying to insert into trigger

    Hi,
    Uisng Oraclle 11.2.0.3 and trying insert into table on remote schema.
    Tracked problem down to one column - the parent_num..
    Offending code
    a.mult_parent_num = ( select   nvl(MGrp_num, 0)
                                from     [email protected]
                                --where   MGrp_PARENT_num is not null
                                --and
                                where substr(upper(MGrp_DESCRIPTION), 2) = (select MULT_NAME
                                                                   from por_multiple p
                                                                   where p.mult_link_multiple_code = B.MULT_LINK_MULTIPLE_num)Complete truigger
    create or replace trigger POR_TRG_POP_IKNOW_MULTIPLE
    after INSERT OR UPDATE or delete   on por_MULTIPLE
    for each row
    -- tO ENSURE I-KNOW KEPT UP-TO-DATE WITH HOMIS MULTIPLE
    -- delib not delet form i-know as if has been used by customer cannot delete
    -- due to referential inetgrity constraints in i-know
    declare
    begin
    -- ensure if updating record one of attributes interested in for ho_issues_stg changed
       IF INSERTING OR UPDATING
       THEN
          MERGE INTO [email protected] a
          USING
           select
           :NEW.MULT_ANMW_MULTIPLE_CODE MULT_ANMW_MULTIPLE_CODE,
           :new.MULT_AUTH_REQUIRED MULT_AUTH_REQUIRED,
           :new.MULT_JMW_MULTIPLE_TYPE_CODE MULT_JMW_MULTIPLE_TYPE_CODE,
           :new.MULT_LINK_MULTIPLE_CODE MULT_LINK_MULTIPLE_num,
           :new.MULT_MULTIPLE_CODE MULT_MULTIPLE_NUM,
           :new.MULT_NAME MULT_NAME,
           :new.MULT_PROM_AUTH_REQUIRED MULT_PROM_AUTH_REQUIRED,
           :new.MULT_SELECTED_MULTIPLE MULT_SELECTED_MULTIPLE,
               'Y' MULT_active_flag,
           nvl(:new.MULT_JMW_MULTIPLE_TYPE_CODE, 0) MULT_CHANNEL_NUM--,
          -- :new.MULT_LINK_MULTIPLE_CODE MULT_PARENT_NUM
           from dual
           ) b
        on
           a.mult_multiple_NUM = b.MULT_MULTIPLE_NUM
    when matched THEN update set
           A.MULT_ANMW_MULTIPLE_CODE = B.MULT_ANMW_MULTIPLE_CODE ,
           A.MULT_AUTH_REQUIRED = B.MULT_AUTH_REQUIRED,
           A.MULT_JMW_MULTIPLE_TYPE_CODE = B.MULT_JMW_MULTIPLE_TYPE_CODE ,
           A.MULT_LINK_MULTIPLE_num = B.MULT_LINK_MULTIPLE_num,
           A.MULT_NAME =B.MULT_NAME,
           A.MULT_PROM_AUTH_REQUIRED=B.MULT_PROM_AUTH_REQUIRED,
           A.MULT_SELECTED_MULTIPLe=B.MULT_SELECTED_MULTIPLE,
               A.MULT_ACTIVE_FLAG = B.MULT_ACTIVE_FLAG,
           A.MULT_CHANNEL_NUM= B.MULT_CHANNEL_NUM
           a.mult_parent_num = ( select   nvl(MGrp_num, 0)
                                from     [email protected]
                                --where   MGrp_PARENT_num is not null
                                --and
                                where substr(upper(MGrp_DESCRIPTION), 2) = (select MULT_NAME
                                                                   from por_multiple p
                                                                   where p.mult_link_multiple_code = B.MULT_LINK_MULTIPLE_num)
    when not matched
    then insert
    A.MULT_ANMW_MULTIPLE_CODE,
           A.MULT_AUTH_REQUIRED,
           A.MULT_JMW_MULTIPLE_TYPE_CODE,
           A.MULT_LINK_MULTIPLE_NUM,
           A.MULT_MULTIPLE_NUM,
           A.MULT_NAME,
           a.MULT_PROM_AUTH_REQUIRED,
           a.MULT_SELECTED_MULTIPLE,
           -- NEW FIELDS ON I-KNOW
           a.MULT_ACTIVE_FLAG,
            a.MULT_CHANNEL_NUM,
             a.MULT_PARENT_NUM
    values
           b.MULT_ANMW_MULTIPLE_CODE,
           b.MULT_AUTH_REQUIRED,
           b.MULT_JMW_MULTIPLE_TYPE_CODE,
           b.MULT_LINK_MULTIPLE_NUM,
           b.MULT_MULTIPLE_NUM,
           b.MULT_NAME,
           b.MULT_PROM_AUTH_REQUIRED,
           b.MULT_SELECTED_MULTIPLE,
           -- NEW FIELDS ON I-KNOW
           b.MULT_ACTIVE_FLAG,
            b.MULT_CHANNEL_NUM,
         --   711-- parent to have parent_num group name of link multiple code
           ( select   nvl(MGrp_num, 0)
              from      [email protected]
                     --where   MGrp_PARENT_num is not null
                     --and
                       where   substr(upper(MGrp_DESCRIPTION), 2) = (select MULT_NAME
                                                                   from por_multiple p
                                                                   where p.mult_link_multiple_code = B.MULT_LINK_MULTIPLE_num)
    update   [email protected]
    set
      MULT_PARENT_num =   ( select   nvl(MGrp_num, 0)
              from     bidsaMULTIPLE_GROUPS
                     where   MGrp_PARENT_num is not null
                     and     substr(upper(MGrp_DESCRIPTION), 2) = MULT_NAME
          MULT_CHANNEL_num = nvl(MULT_JMW_MULTIPLE_TYPE_CODE, 0),
          MULT_ACTIVE_FLAG = 'Y'
    where
      MULT_PARENT_num is null;
    else
         update [email protected] p
         set  mult_active_flag = 'N'
         where  p.mult_multiple_num = :old.mult_multiple_code;
    END IF;
    EXCEPTION
         WHEN OTHERS THEN
            RAISE_APPLICATION_ERROR(-20010,'Error when writing to i-know multiple '||SQLERRM||' '||SQLCODE);
    END POR_TRG_POP_IKNOW_MULTIPLE;What am I doing wrong?

    Definitions bleow.
    Performanve fine - source table rarelyy changed - a temporary solution until the source system replaced with desination system.
    Error:
    Error when writing to multiple (sourec table) ORA-01008 - not all variables bound ORA-02063 - preceding line form bisapprd.
    - 1008 error during execution of trigger
    Source table upon which trigger acting
    -- Create table
    create table POR_MULTIPLE
      mult_multiple_code          NUMBER(4) not null,
      mult_name                   VARCHAR2(20) not null,
      mult_selected_multiple      VARCHAR2(1) not null,
      mult_anmw_multiple_code     VARCHAR2(3),
      mult_link_multiple_code     NUMBER(4),
      mult_jmw_multiple_type_code VARCHAR2(3),
      mult_auth_required          VARCHAR2(1),
      mult_prom_auth_required     VARCHAR2(1)
    )Destination tables being inserted into
    create table POR_MULTIPLE
      mult_multiple_num           NUMBER(4) not null,
      mult_name                   VARCHAR2(20) not null,
      mult_selected_multiple      VARCHAR2(1) not null,
      mult_anmw_multiple_code     VARCHAR2(3),
      mult_link_multiple_num      NUMBER(4),
      mult_jmw_multiple_type_code VARCHAR2(3),
      mult_auth_required          VARCHAR2(1),
      mult_prom_auth_required     VARCHAR2(1),
      mult_parent_num             NUMBER(4),
      mult_channel_num            NUMBER(4),
      mult_active_flag            VARCHAR2(1) not null
    create table MULTIPLE_GROUPS
      mgrp_num         NUMBER(4) not null,
      mgrp_description VARCHAR2(40) not null,
      mgrp_parent_num  NUMBER(4)
    )

  • URGENT:not all variables bound error

    Hi
    I am getting the following error while trying to run my MAAddTrnActPg.xml in the SSHR Module error in my VO. I have checked all the bind variable mappings still getting this error, pls suggest ASAP
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT lpm.LEARNING_PATH_MEMBER_ID,
    lpm.NOTIFY_DAYS_BEFORE_TARGET,
    lpm.BUSINESS_GROUP_ID,
    lpme.LP_MEMBER_ENROLLMENT_ID,
    lpme.MEMBER_STATUS_CODE,
    lpme.COMPLETION_TARGET_DATE,
    lpme.CREATOR_PERSON_ID,
    tav.VERSION_NAME,
    tav.END_DATE,
    tav.START_DATE,
    tav.ACTIVITY_VERSION_ID,
    lpm.ACTIVITY_VERSION_ID AS ACTIVITY_VERSION_ID1,
    decode(nvl(lpme.creator_person_id, -1), :1, 'Yes','No' ) update_switcher,
    decode(nvl(lpme.creator_person_id, -1), :2, 'Yes','No' ) delete_switcher,
    lpm.LEARNING_PATH_SECTION_ID
    from
    ota_learning_path_members lpm,
    ota_lp_member_enrollments lpme,
    ota_activity_versions tav
    where
    lpm.learning_path_section_id = :3
    and lpme.learning_path_member_id = lpm.learning_path_member_id
    and tav.activity_version_id = lpm.activity_version_id
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:865)
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:988)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:211)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:707)
    java.sql.SQLException: ORA-01008: not all variables bound

    Mariah,
    As you are using bind variables in the query itself, u should overide initQuery method in VOimpl class of VO.Like this
    VOimpl class
    =============
    public void initQuery(String creator_person_id,String learning_path_section_id )
    setWhereClauseParam(0,new oracle.jbo.domain.Number(Integer.parseInt(creator_person_id)));
    setWhereClauseParam(1,new oracle.jbo.domain.Number(Integer.parseInt(creator_person_id)));
    setWhereClauseParam(2,new oracle.jbo.domain.Number(Integer.parseInt(learning_path_section_id)));
    executeQuery();
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Not All Variables Bound - Only on Dates in the Visual Studio/Table Adapter

    I am trying to execute a SQL statement created in a table adapter. I am using VS 2010 and ODP 11.2.0.1.2.
    Anytime I add a DATE column in the where clause with a parameter (in bold below) I get one of two errors.
    1. Pass date as 01/01/2010: "Bad Month" -ok I know what this is...
    2. Pass date as 01-JAN-10: ORA-01008: not all variables bound
    where pro.user_id = :user_id
    and (pro.select_typ_cd = 'adr'
    and acct.mkt_uw_empl_id = pro.select_key
    or pro.select_typ_cd = 'abc'
    and acct.mstr_agy_lgl_entity = pro.select_key)
    and (:BUSINESS_TYP_CD = 'all' or acct.BUSINESS_TYP_CD = :BUSINESS_TYP_CD)     
    and (USER_ACCT_STS_CD != 'lost' or SYS_ACCT_STS_CD != 'lost')
    and LOB_EFF_DATE = :EFF_FROM

    Got this to work in one case
    First use to_date LOB_EFF_DATE > to_date(:EFF_DATE_TO,'MM/DD/YYYY').
    Second on the table adapter parameter you have to define the DBType as string not Date, and the provider type as VARCHAR2 not Date. Make sure you change the length to 10 it defaults to 7.
    Oracle needs to fix this why in the world do I have to pass a date in a parameter on a table adapter as a string and go through this mess.

  • Parameters & Not all variables bound

    select like this:
    select *
    from t_department
    where (:param is null and parent_id is null) or
    parent_id = :param
    OracleParameter Param = new OracleParameter("param",OracleDbType.NVarchar2,null,ParameterDirection.Input);
    dbCommand.Parameters.Add(Param);
    OracleDataReader dbReader = dbCommand.ExecuteReader(CommandBehavior.SingleResult);
    Result: ORA-01008: Not all variables bound.

    You need 2 parameters bind calls for that (even though you use the same name :param, ODP.NET does care about the name by default, more later on that)
    You should repeat the same call again to bind to the 2nd ':param'
    OracleParameter Param = new OracleParameter("param",OracleDbType.NVarchar2,null,ParameterDirection.Input);
    dbCommand.Parameters.Add(Param);
    Remember ODP.NET is use bind by position by default (The first OracleParameters in the Collection binds to the first ":param", then the 2nd to ":param"). you can do named bind by setting OracleCommand.BindByName property.
    Arnold

  • Parallel Query Error - 1008 Not All Variables Bound

    Using DB 10g Enterprise Edition Release 10.2.0.1.0
    I am trying to query a table in SQL plus using a bind variable. When I run the query the first time it fails but if I run it again, it works! See the following :
    SQL> var b1 number;
    SQL> exec :b1 := 133348;
    PL/SQL procedure successfully completed.
    SQL> set autot on exp stat
    SQL> select 2 from pension_details where party_id = :b1;
    select 2 from pension_details where party_id = :b1
    ERROR at line 1:
    ORA-12801: error signaled in parallel query server P001
    ORA-01008: not all variables bound
    SQL> /
    2
    2
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=2 Card=1 Bytes=11)
    1 0 INDEX (RANGE SCAN) OF 'PENDTL_PK' (INDEX (UNIQUE)) (Cost=2
    Card=1 Bytes=11)
    If I add a hint suppressing the parallel index option, then it works first time :
    1* select /*+NOPARALLEL_INDEX (PENSION_DETAILS) */ 4 from pension_details where party_id = :b1
    SQL> /
    4
    4
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=2 Card=1 Bytes=11)
    1 0 INDEX (RANGE SCAN) OF 'PENDTL_PK' (INDEX (UNIQUE)) (Cost=2
    Card=1 Bytes=11)
    Can anyone shed any light on why this happens or what I need to check on the table and index? I have tried to replicate this on a different table (and a different db) with the parallel option on both the table and index but it works fine!

    Seeing as there have been no replies, I thought I would update my own thread!
    It turns out this is a bug that has been fixed in 11i. The fix has been back-ported to certain versions/os's.
    I will post the bug reference (it is on Metalink somewhere!) later. In the meantime, a workaround is to use the noparrallel_index hint.

  • ADF - Query Binding - not all variables bound?

    Hi,
    I am using JDeveloper 9.0.5.2
    ADF
    Struts
    JSP
    I followed the directions to set the bind parameters in a view object using a custom method but I get the following error?
    I know I have the parameter populated from the page because I am displaying it on the screen. But it is not binding in the method?
    JBO-27122: SQL error during statement preparation. Statement: SELECT EmpDetailsView.EMPLOYEE_ID, EmpDetailsView.JOB_ID, EmpDetailsView.MANAGER_ID, EmpDetailsView.DEPARTMENT_ID, EmpDetailsView.LOCATION_ID, EmpDetailsView.COUNTRY_ID, EmpDetailsView.FIRST_NAME, EmpDetailsView.LAST_NAME, EmpDetailsView.SALARY, EmpDetailsView.COMMISSION_PCT, EmpDetailsView.DEPARTMENT_NAME, EmpDetailsView.JOB_TITLE, EmpDetailsView.CITY, EmpDetailsView.STATE_PROVINCE, EmpDetailsView.COUNTRY_NAME, EmpDetailsView.REGION_NAME, EmpDetailsView.ROWID FROM EMP_DETAILS_VIEW EmpDetailsView WHERE EmpDetailsView.DEPARTMENT_ID = :1
    ORA-01008: not all variables bound

    There is a sample of how to do it here:
    http://helponline.oracle.com/jdeveloper/help/topics/jdeveloper/developing_mvc_applications/adf_pviewcustommethod.html
    If this is what your doing, you might want to start debuggin to catch the place where it fails.

  • Urgent: not all variable bounds in forms 6i

    hi all
    I am using forms 6i
    I am having problem in this cursor query
    SELECT distinct main_item, des_l FROM table(TECH_BOM_TOT_SRNO(:model0,'X','X','X','X','X')) a,item_master b
    where a.main_item = b.ITEM_CODE
    and LOCATION_cD = :line0;
    it does not fetch any records.
    but if i hardcode the values of bind variables as follows
    SELECT distinct main_item, des_l FROM table(TECH_BOM_TOT_SRNO('MDL0000016','X','X','X','X','X')) a,item_master b
    where a.main_item = b.ITEM_CODE
    and LOCATION_cD = 'FRP';
    it works fine
    i have check the following query
    SELECT count(*) fROM table(TECH_BOM_TOT_SRNO(:model0,'X','X','X','X','X')) a,item_master b
    where a.main_item = b.ITEM_CODE ;
    then it gives an error at runtime
    ora-1008: not all variables bound..
    any help to overcome this problem will be highly appriciated.
    thanks......

    Kritika,
    Oracle Forms 6i is TOO old and does not support Pipelined Functions. You will need to create a view on the database and then select from your view in order to use the Pipelined TABLE() construct.
    SELECT distinct main_item, des_l
    FROM table(TECH_BOM_TOT_SRNO(:model0,'X','X','X','X','X')) a, item_master b
    where a.main_item = b.ITEM_CODE
    and LOCATION_cD = :line0;Additionally, I don't believe you can pass a string reference to an object in place of the object name in the TABLE() function.
    Do us all a favor and take a look at Oracle Forums FAQ! It is extremly helpful if you format your post to make it easier to read!
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

Maybe you are looking for

  • Find Replace from Textfile with regex

    Hello. I'm wondering if anyone knows about an existing script that does a find/replace by list like the script "FindChangeByList.jsx" that comes with every InDesign installation. This consists of tow parts, the script itself with the functionality an

  • Import Intrastat DTW

    Dear all, I try to import some data to the Table BNITMDV (correspoding ti the window Item Intrastat setting of the Intrastat Addon). The aim of the import is to create some records with the Item Code and the Commodity Code. Here is a sample of my DTW

  • How can i rotate the display on the monitor.?t.

    re: HP 6000 series        The display is sideways on the screen, not upright.   Is there a way of rotating the display to normal ?                                                                                                                        

  • Greek on sunray 2

    The problem is that while you can write greek characters on the sunray server when you connect through the sunray 2 clients you can not write in greek. The compose key does not have any effect. Any ideas? Thanks in advance...

  • Saving username/passwords

    I have multiple google accounts. I have been able to save a username/password combo (automatic prompt) for two of them, but have not been able to get Firefox to prompt me to save username/password for additional accounts. I've checked everything I co