Using Dynamic VIEW better pl/sql ?

Hi,
Would like to know your suggestion,
Currently i need to process 5 tables and put the data into a new single Table.
The number of Rows are many, 1000000 and could be even more.
Now i am planning to Create a View from the 5 Tables and then
form the View i am planning to do the Processing and
after which i will put the processed data into the newly created table.
Alternatively i was thinking of having a Collection of Objects(Nested Table) instead of VIEW,
since the number of rows which need to be processed are more i felt this would not be a better option.
Can we go-ahead creating VIEW dynamically, Or is there any better design Solution that you can think of ?
regards,
Alex

Hi,
I have Place the Sample Structure here along with the data .... and the expected output below.
How can we BUILD a SQL Smt for the below :
CREATE TABLE One_T (
one_no NUMBER,
one_message varchar2(20)
CREATE TABLE Two_T (
two_no NUMBER,
two_message varchar2(20)
CREATE TABLE Three_T (
three_no NUMBER,
three_message varchar2(20)
CREATE TABLE Four_T (
four_no NUMBER,
four_message varchar2(20)
CREATE TABLE Five_T (
five_no NUMBER,
five_message varchar2(20)
CREATE TABLE Six_T (
six_col1 varchar2(20),
six_col2 varchar2(20),
six_col3 varchar2(20)
CREATE TABLE New_Table (
New_Table_col1 varchar2(20),
New_Table_col2 varchar2(20),
New_Table_col3 varchar2(20),
New_Table_col4 varchar2(20),
New_Table_col5 varchar2(20),
New_Table_col6 varchar2(20),
New_Table_col7 varchar2(20)
INSERT ALL
INTO One_T(one_no,one_message) VALUES(1,'Message11')
INTO One_T(one_no,one_message) VALUES(2,'Message12')
INTO One_T(one_no,one_message) VALUES(3,'Message13')
INTO One_T(one_no,one_message) VALUES(4,'Message14')
INTO One_T(one_no,one_message) VALUES(5,'Message15')
INTO Two_T(two_no,two_message) VALUES(1,'Message21')
INTO Two_T(two_no,two_message) VALUES(2,'Message22')
INTO Two_T(two_no,two_message) VALUES(3,'Message23')
INTO Two_T(two_no,two_message) VALUES(4,'Message24')
INTO Two_T(two_no,two_message) VALUES(5,'Message25')
INTO Three_T(three_no,three_message) VALUES(1,'Message31')
INTO Three_T(three_no,three_message) VALUES(2,'Message32')
INTO Three_T(three_no,three_message) VALUES(3,'Message33')
INTO Three_T(three_no,three_message) VALUES(4,'Message34')
INTO Three_T(three_no,three_message) VALUES(5,'Message35')
INTO Four_T(four_no,four_message) VALUES(1,'Message41')
INTO Four_T(four_no,four_message) VALUES(2,'Message42')
INTO Four_T(four_no,four_message) VALUES(3,'Message43')
INTO Four_T(four_no,four_message) VALUES(4,'Message44')
INTO Four_T(four_no,four_message) VALUES(5,'Message45')
INTO Five_T(five_no,five_message) VALUES(1,'Message51')
INTO Five_T(five_no,five_message) VALUES(2,'Message52')
INTO Five_T(five_no,five_message) VALUES(3,'Message53')
INTO Five_T(five_no,five_message) VALUES(4,'Message54')
INTO Five_T(five_no,five_message) VALUES(5,'Message55')
INTO Six_T(six_col1,six_col2,six_col3) VALUES(1,'MessageCol111','MessageCol211')
INTO Six_T(six_col1,six_col2,six_col3) VALUES(1,'MessageCol112','MessageCol212')
INTO Six_T(six_col1,six_col2,six_col3) VALUES(2,'MessageCol211','MessageCol221')
INTO Six_T(six_col1,six_col2,six_col3) VALUES(2,'MessageCol221','MessageCol222')
INTO Six_T(six_col1,six_col2,six_col3) VALUES(2,'MessageCol222','MessageCol223')
SELECT * FROM dual;
OUTPUT :
New_Table
MessageCol111, MessageCol211,Message11,Message21,Message31,Message41,Message51
MessageCol112, MessageCol212,Message11,Message21,Message31,Message41,Message51
...

Similar Messages

  • Error in using Dynamic View Object

    Hi
    I am doing a experiment to create dynamic VO and using it.
    Experiment details:
    I want to create dynamic VO and dynamic message choice and associate the dynamic VO to dynamicaly cretaed message choice.
    code scriplet
    In AM
    public void dynamicVO()
    OADBTransactionImpl txn =(OADBTransactionImpl) this.getTransaction();
    OAViewDef viewDef = txn.createViewDef();
    // viewDef.addEntityDerivedAttrDef();
    viewDef.setSql("select EmpEO.EMPNO, EmpEO.ENAME, EmpEO.JOB, EmpEO.DEPTNO from EMP EmpEO");
    viewDef.setExpertMode(true);
    viewDef.addEntityUsage("EmpEO","va.oracle.apps.fnd.experiment.server.EmpEO",false);
    viewDef.setViewObjectClass("oracle.apps.fnd.framework.server.OAViewObjectImpl");
    viewDef.setViewRowClass("oracle.apps.fnd.framework.server.OAViewRowImpl");
    viewDef.addPersistentAttrDef("Empno", "EmpEO", "Empno", true, AttributeDef.UPDATEABLE);
    viewDef.addPersistentAttrDef("Ename", "EmpEO", "Ename", true, AttributeDef.UPDATEABLE);
    viewDef.addPersistentAttrDef("Job", "EmpEO", "Job", true, AttributeDef.UPDATEABLE);
    viewDef.addPersistentAttrDef("Deptno", "EmpEO", "Deptno", true, AttributeDef.UPDATEABLE);
    // OAViewObject
    // ViewObject
    ViewObject vo = createViewObject("MyEmpVO", viewDef);
    In Controller
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.invokeMethod("dynamicVO");
    System.out.println("am.invokeMethod dynamicVO");
    OAMessageChoiceBean popList = (OAMessageChoiceBean)this.createWebBean(pageContext,OAMessageChoiceBean.MESSAGE_CHOICE_BEAN);
    //popList.setListViewObject(pageContext,MyEmpVO);
    popList.setPickListViewUsageName("MyEmpVO");
    popList.setListDisplayAttribute("Job");
    popList.setListValueAttribute("Job");
    webBean.addIndexedChild(popList);// when i comment out this a blank page runs otherwise following error appears
    Error stack
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: select EmpEO.EMPNO, EmpEO.ENAME, EmpEO.JOB, EmpEO.DEPTNO from EMP EmpEO
    at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
    at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
    at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2898)
    at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2700)
    at OA.jspService(OA.jsp:48)
    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-01003: no statement parsed
    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:1983)
    at oracle.jdbc.ttc7.TTC7Protocol.executeFetch(TTC7Protocol.java:1002)
    at oracle.jdbc.dbaccess.DBAccess.executeFetchNeedDefines(DBAccess.java:283)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2604)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2854)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:622)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:550)
    at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:627)
    at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:515)
    at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3347)
    at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:825)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4465)
    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:3311)
    at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3298)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:439)
    at oracle.apps.fnd.framework.webui.OAWebBeanPickListHelper.createListDataObject(OAWebBeanPickListHelper.java:973)
    at oracle.apps.fnd.framework.webui.OAWebBeanPickListHelper.getListDataObject(OAWebBeanPickListHelper.java:818)
    at oracle.apps.fnd.framework.webui.OAWebBeanPickListHelper.getList(OAWebBeanPickListHelper.java:446)
    at oracle.apps.fnd.framework.webui.OAWebBeanPickListHelper.getList(OAWebBeanPickListHelper.java:403)
    at oracle.apps.fnd.framework.webui.beans.message.OAMessageChoiceBean.getList(OAMessageChoiceBean.java:762)
    at oracle.apps.fnd.framework.webui.OADataBoundValuePickListData.getValue(OADataBoundValuePickListData.java:86)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.getAttributeValueImpl(OAWebBeanHelper.java:1760)
    at oracle.apps.fnd.framework.webui.beans.message.OAMessageChoiceBean.getAttributeValueImpl(OAMessageChoiceBean.java:369)
    at oracle.cabo.ui.BaseUINode.getAttributeValue(Unknown Source)
    at oracle.apps.fnd.framework.webui.OADataBoundValuePickListSelectionIndex.getValue(OADataBoundValuePickListSelectionIndex.java:61)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.getAttributeValueImpl(OAWebBeanHelper.java:1760)
    at oracle.apps.fnd.framework.webui.beans.message.OAMessageChoiceBean.getAttributeValueImpl(OAMessageChoiceBean.java:369)
    at oracle.cabo.ui.BaseUINode.getAttributeValue(Unknown Source)
    at oracle.cabo.ui.collection.UINodeAttributeMap.getAttribute(Unknown Source)
    at oracle.cabo.ui.collection.AttributeMapProxy.getAttribute(Unknown Source)
    at oracle.cabo.ui.BaseUINode.getAttributeValueImpl(Unknown Source)
    at oracle.cabo.ui.BaseUINode.getAttributeValue(Unknown Source)
    at oracle.cabo.ui.collection.UINodeAttributeMap.getAttribute(Unknown Source)
    at oracle.cabo.ui.BaseUINode.getAttributeValueImpl(Unknown Source)
    at oracle.cabo.ui.BaseUINode.getAttributeValue(Unknown Source)
    at oracle.cabo.ui.laf.base.BaseLafUtils.getLocalAttribute(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.OptionContainerRenderer.getSelectedIndex(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.OptionContainerRenderer.populateOptionInfo(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.OptionContainerRenderer.createOptionInfo(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.OptionContainerRenderer.prerender(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.ChoiceRenderer.prerender(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.FormElementRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderNamedChild(Unknown Source)
    at oracle.cabo.ui.laf.base.SwitcherRenderer._renderCase(Unknown Source)
    at oracle.cabo.ui.laf.base.SwitcherRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.renderWithNode(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.RowLayoutRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.renderWithNode(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.InlineMessageRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.composite.ContextPoppingUINode$ContextPoppingRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.laf.oracle.desktop.HeaderRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.BorderLayoutRenderer.renderIndexedChildren(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.BorderLayoutRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.renderWithNode(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.oracle.desktop.PageLayoutRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.BodyRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.apps.fnd.framework.webui.beans.OABodyBean.render(OABodyBean.java:398)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.DocumentRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.DocumentRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.partial.PartialPageUtils.renderPartialPage(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageBean.render(OAPageBean.java:3209)
    at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2888)
    at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2700)
    at OA.jspService(OA.jsp:48)
    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-01003: no statement parsed
    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:1983)
    at oracle.jdbc.ttc7.TTC7Protocol.executeFetch(TTC7Protocol.java:1002)
    at oracle.jdbc.dbaccess.DBAccess.executeFetchNeedDefines(DBAccess.java:283)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2604)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2854)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:622)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:550)
    at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:627)
    at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:515)
    at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3347)
    at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:825)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4465)
    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:3311)
    at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3298)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:439)
    at oracle.apps.fnd.framework.webui.OAWebBeanPickListHelper.createListDataObject(OAWebBeanPickListHelper.java:973)
    at oracle.apps.fnd.framework.webui.OAWebBeanPickListHelper.getListDataObject(OAWebBeanPickListHelper.java:818)
    at oracle.apps.fnd.framework.webui.OAWebBeanPickListHelper.getList(OAWebBeanPickListHelper.java:446)
    at oracle.apps.fnd.framework.webui.OAWebBeanPickListHelper.getList(OAWebBeanPickListHelper.java:403)
    at oracle.apps.fnd.framework.webui.beans.message.OAMessageChoiceBean.getList(OAMessageChoiceBean.java:762)
    at oracle.apps.fnd.framework.webui.OADataBoundValuePickListData.getValue(OADataBoundValuePickListData.java:86)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.getAttributeValueImpl(OAWebBeanHelper.java:1760)
    at oracle.apps.fnd.framework.webui.beans.message.OAMessageChoiceBean.getAttributeValueImpl(OAMessageChoiceBean.java:369)
    at oracle.cabo.ui.BaseUINode.getAttributeValue(Unknown Source)
    at oracle.apps.fnd.framework.webui.OADataBoundValuePickListSelectionIndex.getValue(OADataBoundValuePickListSelectionIndex.java:61)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.getAttributeValueImpl(OAWebBeanHelper.java:1760)
    at oracle.apps.fnd.framework.webui.beans.message.OAMessageChoiceBean.getAttributeValueImpl(OAMessageChoiceBean.java:369)
    at oracle.cabo.ui.BaseUINode.getAttributeValue(Unknown Source)
    at oracle.cabo.ui.collection.UINodeAttributeMap.getAttribute(Unknown Source)
    at oracle.cabo.ui.collection.AttributeMapProxy.getAttribute(Unknown Source)
    at oracle.cabo.ui.BaseUINode.getAttributeValueImpl(Unknown Source)
    at oracle.cabo.ui.BaseUINode.getAttributeValue(Unknown Source)
    at oracle.cabo.ui.collection.UINodeAttributeMap.getAttribute(Unknown Source)
    at oracle.cabo.ui.BaseUINode.getAttributeValueImpl(Unknown Source)
    at oracle.cabo.ui.BaseUINode.getAttributeValue(Unknown Source)
    at oracle.cabo.ui.laf.base.BaseLafUtils.getLocalAttribute(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.OptionContainerRenderer.getSelectedIndex(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.OptionContainerRenderer.populateOptionInfo(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.OptionContainerRenderer.createOptionInfo(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.OptionContainerRenderer.prerender(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.ChoiceRenderer.prerender(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.FormElementRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderNamedChild(Unknown Source)
    at oracle.cabo.ui.laf.base.SwitcherRenderer._renderCase(Unknown Source)
    at oracle.cabo.ui.laf.base.SwitcherRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.renderWithNode(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.RowLayoutRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.renderWithNode(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.InlineMessageRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.composite.ContextPoppingUINode$ContextPoppingRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.laf.oracle.desktop.HeaderRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.BorderLayoutRenderer.renderIndexedChildren(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.BorderLayoutRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.renderWithNode(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.oracle.desktop.PageLayoutRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.BodyRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.apps.fnd.framework.webui.beans.OABodyBean.render(OABodyBean.java:398)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.DocumentRenderer.renderContent(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.laf.base.xhtml.DocumentRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.partial.PartialPageUtils.renderPartialPage(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageBean.render(OAPageBean.java:3209)
    at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2888)
    at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2700)
    at OA.jspService(OA.jsp:48)
    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)
    Mithun

    Mithun,
    Don't repost the issues. Follow the original on Re: Error in using Dynamic view object
    --Shiv                                                                                                                                                                                                                                                                                       

  • How to use Dynamic View as a Prompt Table?

    Can someone give me or point me to an example of the code / syntax needed for this?
    First, to be clear, I'm not simply trying to have the name of the prompt table be a variable; e.g. I don't want to define the prompt table as %EDITTABLE and set the value of this field in pcode. I want to have a view where I can dynamically at run time change the WHERE clause in the SQL.
    In particular, I want to be able to specify WHERE BUSINESS_UNIT IN (xxxx)
    and to build the list of values at run time in pcode.
    - How should I code the SQL in the record? (Or do I leave the SQL blank and somehow pass the entire SQL from pcode?)
    - How do I code the SQL in my pcode, and how will this be passed to or incorporated into the prompt table? I know that I can code something like
    &BU_List = "'" || &BU1 || "','" || &BU2 || "'";
    but what's the next step?
    Thanks.
    Mike
    HCM 9.0

    I figured out the answer:
    - The prompt table is a dynamic view.
    - The field that points to the prompt table has a property called SQLText. Assigning SQL to that field/property causes the dynamic view's SQL (if any) to be overwritten with the new SQL.
    In this example, I take the basic SQL from a SQL object, then append an AND clause (which contains a list of BU values that I built in previous pcode) and assigns the concatenated SQL to field.SQLText.
    &SQLText = FetchSQL(SQL.B_DISTINCT_JOB_UNION);
    &WhereBU = " AND BUSINESS_UNIT IN (" | &BU_List | ")";
    B_BN016R_RUN.UNION_CD.SqlText = &SQLText | &WhereBU;

  • ORA-12714 when using inline view in PL/SQL

    Oracle 9.2.0.4 on Solaris8(SPARC 64).
    I have stripped and simplify the code:
    create type parent_type as object (parent_col number(10)) not instantiable not final;
    create type sub_type under parent_type (child_col nvarchar2(30));
    create table test (table_col parent_type);
    SQL statement works:
    SELECT a
    FROM
    (select treat(table_col as sub_type).child_col a
    from test)
    ...but the sam statement in PL/SQL returns:
    DECLARE temp_var NVARCHAR2(30);
    BEGIN
    SELECT a
    INTO temp_var
    FROM
    (select treat(table_col as sub_type).child_col a
    from test);
    end;
    ERROR at line 3:
    ORA-06550: line 3, column 8:
    PL/SQL: ORA-12714: invalid national character set specified
    ORA-06550: line 3, column 1:
    PL/SQL: SQL Statement ignored
    SQL> run
    1* select parameter,value from v$nls_parameters where parameter like '%CHARACTERSET%'
    PARAMETER VALUE
    NLS_CHARACTERSET EE8ISO8859P2
    NLS_NCHAR_CHARACTERSET AL16UTF16
    Where do I specify national character set ?
    NLS_LANG=SLOVENIAN_SLOVENIA.EE8ISO8859P2
    ORA_NLS33 is unset (it makes no diference if I set it manually).
    Can anyone reproduce error ?

    I get the error even on 10g. The value for NLS_LANG is:
    AMERICAN_AMERICA.WE8MSWIN1252
    SQL> create type parent_type as object (parent_col number(10)) not instantiable not final;
      2  /
    Type created.
    SQL> create type sub_type under parent_type (child_col nvarchar2(30));
      2  /
    Type created.
    SQL> create table test (table_col parent_type);
    Table created.
    SQL> SELECT a
      2  FROM
      3  (select treat(table_col as sub_type).child_col a
      4  from test)
      5  /
    no rows selected
    SQL> DECLARE temp_var NVARCHAR2(30);
      2  BEGIN
      3  SELECT a
      4  INTO temp_var
      5  FROM
      6  (select treat(table_col as sub_type).child_col a
      7  from test);
      8  end;
      9  /
    SELECT a
    ERROR at line 3:
    ORA-06550: line 3, column 8:
    PL/SQL: ORA-12714: invalid national character set specified
    ORA-06550: line 3, column 1:
    PL/SQL: SQL Statement ignored
    SQL> select * from nls_database_parameters
      2  where parameter like '%CHARACTERSET';
    PARAMETER                      VALUE
    NLS_CHARACTERSET               WE8ISO8859P15
    NLS_NCHAR_CHARACTERSET         AL16UTF16
    SQL> select * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production
    PL/SQL Release 9.2.0.3.0 - Production
    CORE    9.2.0.3.0       Production
    TNS for Solaris: Version 9.2.0.3.0 - Production
    NLSRTL Version 9.2.0.3.0 - Production
    SQL> disconnect
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production
    With the Partitioning option
    JServer Release 9.2.0.3.0 - Production
    SQL> create type parent_type as object (parent_col number(10)) not instantiable not final;
      2  /
    Type created.
    SQL> create type sub_type under parent_type (child_col nvarchar2(30));
      2  /
    Type created.
    SQL> create table test (table_col parent_type);
    Table created.
    SQL> SELECT a
      2  FROM
      3  (select treat(table_col as sub_type).child_col a
      4  from test)
      5  /
    no rows selected
    SQL> DECLARE temp_var NVARCHAR2(30);
      2  BEGIN
      3  SELECT a
      4  INTO temp_var
      5  FROM
      6  (select treat(table_col as sub_type).child_col a
      7  from test);
      8  end;
      9  /
    SELECT a
    ERROR at line 3:
    ORA-06550: line 3, column 8:
    PL/SQL: ORA-12714: invalid national character set specified
    ORA-06550: line 3, column 1:
    PL/SQL: SQL Statement ignored
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bi
    PL/SQL Release 10.1.0.2.0 - Production
    CORE    10.1.0.2.0      Production
    TNS for Solaris: Version 10.1.0.2.0 - Production
    NLSRTL Version 10.1.0.2.0 - Production
    SQL> select * from nls_database_parameters
      2  where parameter like '%CHARACTERSET';
    PARAMETER                      VALUE
    NLS_CHARACTERSET               WE8ISO8859P15
    NLS_NCHAR_CHARACTERSET         AL16UTF16
    SQL> disconnect
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
    With the Partitioning, Oracle Label Security, OLAP and Data Mining options
    SQL>

  • Paging issues using a dynamic view object...

    I am working on an application that uses JAG to generate JSP pages, i had the requirement to use dynamic view objects where the view object query is generated at runtime. The rest of the application is more or less the same... I used the defult functionality provided by TableScrollButtons.jsp file for paging. Now the problem im facing is that while the '>' and '<' buttons are working fine, i cant seem to navigate to the pages using the drop down...
    With the default handler, whenever i select the range the range displayed remains the same ie 1-10, 10 being the rangesize, but the rows are refreshed with values from the next page. Also, if the next page is the last and is incomplete, then the rows are pushed in from the bottom, so that the last page is always full...I tried the tuning panel in the view object edit dialogue and all settings are fine (i think)...could anyone please tell me what i am doing wrong??

    could it be because i am using a dynamic view object with dynamic bindings? i am using the preparemodel() method in the action as follows...
    protected void prepareModel(DataActionContext ctx) throws Exception {
    inferRangeBindingIfUnset(ctx);
    ctx.getBindingContainer().setEnableTokenValidation(false);
    String sql = ctx.getHttpServletRequest().getParameter("sql");
    String cost=ctx.getHttpServletRequest().getParameter("CostCostCent");
    String event=ctx.getHttpServletRequest().getParameter("event");
    if (sql != null && event == null) {
    setupDynamicQueryAndDynamicBindings(ctx,sql.substring(1),cost);
    if (retrieveOnlyCurrentPageFromDatabase()) {
    ViewObject vo = getIterForPaging(ctx).getViewObject();
    if (vo.getAccessMode() != ViewObject.RANGE_PAGING) {
    vo.setAccessMode(ViewObject.RANGE_PAGING);
    // if(event==null)
    super.prepareModel(ctx);
    ctx.getBindingContainer().setEnableTokenValidation(true);
    if (ctx.getEvents() == null || ctx.getEvents().size() ==0) {
    setPage(ctx,1);
    setLastPage(ctx,getIterForPaging(ctx).getRowSetIterator().getEstimatedRangePageCount());
    else if(event.equals("setRangeStart")) {
    setPageFromRequest(ctx);
    }

  • Select from Query ? / Dynamic view ? Anything else ?

    Hello,
    This could be a bit challenging. (or maybe not, i hope)
    I have to create a report which is based on 3/4 tables with pretty complex SQL.
    Step 1. I have to use views (in the database currently) to select data from these tables.
    Step 2. Then create the next set of views (in the db) based on the previous views.
    Step 3. Then finally join the last set of views in Reports and create the report based on the PARAMETERS entered.
    This was fine, until the client changed the criteria. Now the views have to be created but the PARAMETERS affect the FIRST set of views.
    That is, the views in the FIRST STEP will have a where condition based on the parameters at RUN TIME.
    I was wondering about how to do this ?
    1. Can I use dynamic views (in db) passing the where condition parameter to the where clause ? Alternatively use DDL in Reports.
    OR
    2. Create a query in Reports and create subsequent QUERIES BASED ON THE FIRST QUERY (like MS Access). Can this be done ?
    3. Any other way ?
    If you need any clarification, I can provide that.
    THANKS for taking the time to read it. It would be great if you could give me any ideas.
    Pat.

    hello,
    you might look into REF-CURSOR-QUERIES for this particular case. it might help.
    regards,
    the oracle reports team

  • Master-detail with dynamic view object

    How can you create a view link with a view object that is dynamic? I have created a master-detail relationship on a UIX page. I change the master view object at runtime using a view definition and SQL and then I bind the view object to an iterator on a UIX page. I need the new dynamic view object to maintain the link between the detail view object. Is this possible?
    The reason why I have to change the view object at runtime is because I am implementing a search module and the tables in the from clause can be modified at runtime so I need to have a dynamic view object.
    Thanks,
    Sanjay

    After playing around with ViewObjectImpl's setQuery() method some more I found out that this solution might not work for me due to the following reason: when the user tries to sort a column in the result table, the original contents of the view object get executed instead of the run time query.
    <p>
    I would like to go back to my original solution that included creating a view definition based on the runtime query and then creating a view object from that which I bind to the RowSetIterator. The missing piece to the master-detail functionality is with the detail Iterator being in sync with the master. I have tried the following but I get a ClassCastException <p>
    DCIteratorBinding detailBinding = ctx.getBindingContainer().findIteratorBinding("DetailIterator");
    detailBinding.getViewObject().<b>setMasterRowSetIterator</b>(masterBinding.getRowSetIterator());
    <p>
    here is the relevant stack trace:
    java.lang.ClassCastException
    at oracle.jbo.client.remote.ViewUsageImpl.getImplObject(ViewUsageImpl.java:1829)
    at oracle.jbo.client.remote.RowSetImpl.setMasterRowSetIterator(RowSetImpl.java:512)
    at oracle.jbo.client.remote.ViewUsageImpl.setMasterRowSetIterator(ViewUsageImpl.java:1147)
    at oracle.jbo.common.ws.WSViewObjectImpl.setMasterRowSetIterator(WSViewObjectImpl.java:1005)

  • Dynamic binding of items in sap.m.Table using XML views

    Dear SAPUI5 guru's,
    Let's start by saying I'm an ABAP developer who's exploring SAPUI5, so I'm still a rookie at the time of writing. I challenged myself by developing a simple UI5 app that shows information about my colleagues like name, a pic, address data and their skills. The app uses the sap.m library and most of the views are XML based which I prefer.
    The data is stored on an ABAP system and exposed via a gateway service. This service has 2 entities: Employee and Skill. Each employee can have 0..n skills and association/navigation between these 2 entities is set up correctly in the service. The data of this service is fetched from within the app using a sap.ui.model.odata.ODataModel model.
    The app uses the splitApp control which shows the list of employees on the left side (master view). If a user taps an employee, the corresponding details of the employee entity are shown on the right (detail view).
    Up till here everything is fine but I've been struggling with my latest requirement which is: show the skills of the selected employee in a separate XML view when the user performs an action (for the time being, I just created a button on the detail view to perform the action). After some hours I actually got it working but I doubt if my solution is the right way to go. And that's why I'm asking for your opinion here.
    Let's explain how I got things working. First of all I created a new XML view called 'Skills'. The content on this view is currently just a Table with 2 columns:
    <core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
      controllerName="com.pyramid.Skills" xmlns:html="http://www.w3.org/1999/xhtml">
      <Page title="Skills"
           showNavButton="true"
           navButtonPress="handleNavButtonPress">
      <content>
      <Table
       id="skillsTable">
      <columns>
      <Column>
      <Label text="Name"/>
      </Column>
      <Column>
      <Label text="Rating"/>
      </Column>
      </columns>
      </Table>
      </content>
      </Page>
    </core:View>
    The button on the Detail view calls function showSkills:
    showSkills: function(evt) {
      var context = evt.getSource().getBindingContext();
      this.nav.to("Skills", context);
      var skillsController = this.nav.getView().app.getPage("Skills").getController();
      skillsController.updateTableBinding();
    Within 'this.nav.to("Skills", context);' I add the Skills view to the splitApp and set its bindingContext to the current binding context (e.g. "EmployeeSet('000001')"). Then I call function updateTableBinding in the controller of the Skills view which dynamically binds the items in the table based on the selected employee. So, when the ID of the selected employee is '000001', the path of the table's item binding should be "/EmployeeSet('000001')/Skills"
    updateTableBinding: function(){
      var oTemplate = new sap.m.ColumnListItem(
      {cells: [
              new sap.m.Text({text : "{Name}"}),
              new sap.m.Text({text : "{Rating}"})
      var oView = this.getView();
      var oTable = oView.byId("skillsTable");
      var oContext = oView.getBindingContext();
      var path = oContext.sPath + "/Skills";
      oTable.bindItems(path, oTemplate);
    Allthough it works fine, this is where I have my first doubt. Is this the correct way to bind the items? I tried to change the context that is passed to this.nav.to and wanted it to 'drill-down' one level, from Employee to Skills, but I couldn't manage to do that.
    I also tried to bind using the items aggregation of the table within the XML declaration (<Table id="skillsTable" items="{/EmployeeSet('000001')/Skills}">). This works fine if I hard-code the employee ID but off course this ID needs to be dynamic.
    Any better suggestions?
    The second doubt is about the template parameter passed to the bindItems method. This template is declared in the controller via javascript. But I'm using XML views! So why should I declare any content in javascript?? I tried to declare the template in the XML view itself by adding an items tag with a ColumnListItem that has an ID:
                    <items>
                        <ColumnListItem
                        id="defaultItem">
                        <cells>
                            <Text text="{Name}"/>
                            </cells>
                            <cells>
                            <Text text="{Rating}"/>
                            </cells>
                        </ColumnListItem>
                    </items>
    Then, in the updateTableBinding function, I fetched this control (by ID), and passed it as the template parameter to the bindItems method. In this case the table shows a few lines but they don't contain any data and their height is only like 1 mm! Does anyone know where this strange behaviour comes from or what I'm doing wrong?
    I hope I explained my doubts clearly enough. If not, let me know which additional info is required.
    Looking forward to your opinions/suggestions,
    Rudy Clement.

    Hi everybody,
    I found this post by searching for a dynamic binding for well acutally not the same situation but it's similar to it. I'm trying to do the following. I'm having a list where you can create an order. On the bottom of the page you'll find a button with which you're able to create another order. All the fields are set to the same data binding ... so the problem is if you've filled in the values for the first order and you'll press the button you'll get the same values in the second order. Is it possible to generate a dynamic binding?
    I'm going to post you a short code of what I'm meaning:
    <Input type="Text" value="{path: 'MyModel>/Order/0/Field1'}" id="field1">
         <layoutData>
                    <l:GridData span="L11 M7 S3"></l:GridData>
               </layoutData>
    </Input>
    As you can see I need to set the point of "0" to a dynamic number. Is there any possibility to reach this???
    Hope you can help
    Greetings
    Stef

  • Getting error while using DYNAMIC SQL

    Hi Team,
    I am Oracle DBA. I have limited knowledge on PL/SQL. I used below PL/SQL code to drop 50 partitons from one of the table.
    I used Dynamic SQL EXECUTE IMMEDIATE to drop partions. But error occured. If I commented EXECUTE IMMEDIATE, procedure executed successfully.
    Please suggest me, where i did the mistake. Also please suggest for better code than my code. please find below code and error details.
    SQL> ed
    Wrote file afiedt.buf
    1 DECLARE
    2 CURSOR DROP_PARTITON IS select partition_name from user_tab_subpartitions where PARTITION_NAME<='ABCD_2011_04';
    3 BEGIN
    4 for curr IN DROP_PARTITON LOOP
    5 DBMS_output.put_line(curr.partition_name);
    6 execute immediate(Alter table Table_Name drop partition curr.partition_name);
    7 end loop;
    8* END;
    SQL> /
    execute immediate(Alter table BILLCHRG drop partition curr.partition_name);
    ERROR at line 6:
    ORA-06550: line 6, column 19:
    PLS-00103: Encountered the symbol "ALTER" when expecting one of the following:
    ( - + case mod new not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    <an alternatively-quoted string literal with character set specification>
    <an alternative
    SQL> ed
    Wrote file afiedt.buf
    1 DECLARE
    2 CURSOR DROP_PARTITON IS select partition_name from user_tab_subpartitions where PARTITION_NAME<='ABCD_2011_04';
    3 BEGIN
    4 for curr IN DROP_PARTITON LOOP
    5 DBMS_output.put_line(curr.partition_name);
    6 --execute immediate(Alter table TABLE_NAME drop partition curr.partition_name);
    7 end loop;
    8* END;
    SQL> /
    ABCD_2009_06
    ABCD_2009_06
    ABCD_2009_06
    BILLCHRG_2011_04
    PL/SQL procedure successfully completed.

    PL/SQL code runs on the server, inside an Oracle process - thus PL/SQL code cannot dynamically write and display messages to the client. That server process is not connected to any keyboard, mouse or display.
    DBMS_OUTPUT can be used. This is a PL/SQL buffer area in that server process that code can write lines of text too. When the server process informs the client that it has completed, the client can now request the contents of the DBMS_OUTPUT buffer and the client can display it on the client device.
    This is what set serveroutput on in SQL*Plus does - tell the sqlplus client to request the DBMS_OUTPUT buffer after each Oracle server call made and to display the contents locally.
    So to display the SQL command can be done using DBMS_OUTPUT. E.g.
    declare
      dropPart varchar2(32767);
    begin
      for c in (select...) loop
        dropPart := 'alter table my_tab drop partition '||c.partition_name';
        --// write the SQL command to DBMS_OUTPUT
        DBMS_OUTPUT.put_line( dropPart );
        --// execute the SQL using a begin..end block in order to catch error
        begin
          execute immediate dropPart;
          DBMS_OUTPUT.put_line( 'command completed successfully' );
        exception when OTHERS then
          DBMS_OUTPUT.put_line( 'command failed with: '||SQLERRM(SQLCODE) );
        end;
      end loop;
    end;So after this code block has been executed and partitions dropped, sqlplus will display the DBMS_OUTPUT generated by this code block.

  • Sql server 2012 express - tcp/ip connection to named instance using dynamic port not working

    I have a named instance on a SQL 2012 Express server that won't connect via TCP/IP when wanting to connect off of the dynamic port.  I can connect via shared memory locally on the server.   I can connect to the namespace when specifying the
    dynamic port listed in the configuration manager.  
    This is the only named instance on the server and it is not the default.
    TCP/IP is enabled
    Allow Remote connections is enabled
    the server browser service is running
    I can connect via the dynamic port number
    I am testing the connection locally on the server, so I don't believe a firewall is the issue.  I get the same results if I test it from a remote computer.
    When using the sqlcmd (sqlcmd -S tcp:SQLSRVR\NAMEINST -E) I get the message that "the requested protocol isn't supported [xfffffffff]".   The command (sqlcmd -S tcp:SQLSRVR\NAMEINST,59992 -E) works.
    Through SSMS, I get the message "the connection was actively refused".
    On other boxes, I can connect with the named instance without having to specify the port. 
    I have looked through the sql logs and nothing much shows up.  The log does show that is listening on the port # for ipv4 and ipv6.   There is also a line in there talking about the SPN not being registered and not to worry about it if
    you are not using Kerberos.  I logged in through shared memory and it said I was using NTLM.
    Any help would be appreciated.
    thanks.

    Hi clw,
    I’m writing to follow up with you on this post. According to your description, I do a test, if you configure the database engine to listen on a specific TCP port (59992), and
    the port is opened in the firewall. If you want to connect to the SQL Server instance, you 'd better to
    use the port number.
    In my opinion, by default, the default instance of the Database Engine uses port 1433, usually, if you have configured the server to listen on a non-default port number, when an instance of SQL Server uses dynamic port allocation, the connection string that
    is built at the SQL Server client does not specify the destination TCP/IP port unless the user or the programmer explicitly specifies the port. Therefore, the SQL Server client library queries the server on UDP port 1434 to collect the information about the
    destination instance of SQL Server.
    If UDP port 1434 is disabled, the SQL Server client cannot dynamically determine the port of the named instance of SQL Server. Therefore, the SQL Server client may be unable to connect to the named instance of SQL Server. In this situation, the SQL Server
    client must specify the dynamically allocated port where the named instance of SQL Server is listening.
    For more information about configuring an instance of SQL Server to listen on a specific TCP port or dynamic port, you can review the following article.
    https://support.transfrm.com/entries/503111-How-to-configure-an-instance-of-SQL-Server-to-listen-on-a-specific-TCP-port-or-dynamic-port
    Thanks,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • ORA-01006 using Dynamic SQL

    Hello,
    I'm trying to create a function utilizing Dynamic SQL. The function compiles fine, but when I go to call it using the select staement below, I get :
    ORA-01006: bind variable does not exist
    ORA-06512: at "ICIM.PROD_SALES_DATA", line 24
    select prod_sales_data('09','I',2009,'Awning')
    from dual;
    CREATE OR REPLACE FUNCTION prod_sales_data
    (p_ahl1 IN VARCHAR2, p_phl1 IN VARCHAR2, p_fisyr IN NUMBER,
    p_prod_str IN VARCHAR2)
    RETURN NUMBER IS
    v_return NUMBER;
    query_str VARCHAR2(10000);
    BEGIN
    query_str :='select sum(a.qsh*a.unitcnt)'||chr(13)
    ||'from sh_units a, sh_product_desc b, sh_ad_glass c'||chr(13)
    ||'where a.unittype = b.unittype'||chr(13)
    ||'and a.sh_id = c.sh_id(+)'||chr(13)
    ||'AND a.ahl1 = '||chr(39)||p_ahl1||chr(39)||chr(13)
    ||'AND a.phl1 = '||chr(39)||p_phl1||chr(39)||chr(13)
    ||'AND a.fisyr ='|| p_fisyr||chr(13)
    ||'AND UPPER(b.descrip) = UPPER('||chr(39)||p_prod_str||chr(39)||')'||chr(13)
    ||'AND a.invdt between b.eff_beg and b.eff_end'||chr(13)
    ||'and a.parts_flag <>'||chr(39)||'Y'||chr(39)||chr(13)
    ||'and a.unittype <>'||chr(39)||'OTHE'||chr(39)||chr(13)
    ||'and icim.sh_rept_chk_ortp(a.ortp) = 1'||chr(13)
    ||'and A.REPT_RELEASE_DT is not null';
    DBMS_OUTPUT.PUT_LINE(query_str) ;
    EXECUTE IMMEDIATE query_str
    INTO v_return
    USING p_ahl1,p_phl1,p_fisyr,p_prod_str;
    RETURN v_return;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    END prod_sales_data ;
    Any help as to what is going wrong would be greatly appreciated.
    Thanks,
    Tyler

    Hello,
    >
    I'm trying to create a function utilizing Dynamic SQL. But why?
    Whenever you turn towards dynamic SQL, ask yourself why?
    I bet for a couple of years you aren't able rto come up with an answer. Meaning you shouldn't.
    Even if you do come up with an answer, think again. The answer may very well be wrong.
    Wouldn't it be nice if your function was as simple as:
    CREATE OR REPLACE FUNCTION prod_sales_data
       ( p_ahl1      IN VARCHAR2
       , p_phl1      IN VARCHAR2
       , p_fisyr     IN NUMBER,
         p_prod_str  IN VARCHAR2)
    RETURN NUMBER
    IS
       v_return NUMBER;
    BEGIN
        select sum(a.qsh*a.unitcnt)
          into v_return
          from sh_units a
             , sh_product_desc b
             , sh_ad_glass c
         where a.unittype = b.unittype
           and a.sh_id = c.sh_id(+)
           and a.ahl1 =  p_ahl1
           and a.phl1 =  p_phl1
           and a.fisyr = p_fisyr
           and upper(b.descrip) = upper(p_prod_str)
           and a.invdt between b.eff_beg and b.eff_end
           and a.parts_flag != 'Y'
           and a.unittype != 'OTHE'
           and icim.sh_rept_chk_ortp(a.ortp) = 1
           and a.rept_release_dt is not null;
    RETURN v_return;
    EXCEPTION
       WHEN NO_DATA_FOUND THEN
          RETURN NULL;
    END prod_sales_data ;
    /Now using proper bind variables, plain static pre-compiled SQL. And even works properly WITH NO DATA FOUND.
    I know it's dangerous to use words as always and never, but i dare say
    Always (Whenever you can) use static SQL. Never (Unless you must) use dynamic SQL (When you can use static).
    Regards
    Peter

  • Can we use Dynamic SQL in Oracle Reports ?

    Hi ,
    Can we use Dynamic SQL in Oracle Reports ?
    If yes please give some examples .
    Thanx
    srini

    I believe the built-in package SRW.Do_Sql is what you are looking for
    Example from the document:
    /* Suppose you want to create a "table of contents" by getting the
    ** first character of a columns value, and page number on which its
    ** field fires to print. Assume that you want to put the "table of
    contents"
    ** into a table named SHIP. You could write the following construct:
    DECLARE
    PAGE_NO NUMBER;
    PAGE_FOR INDEX NUMBER;
    SORT_CHAR CHAR(1);
    CMD_LINE CHAR(200);
    BEGIN
    SORT_CHAR := :SORT_NAME ;
    IF :CALLED = Y THEN
         SRW.GET_PAGE_NUM(PAGE_FOR_INDEX);
         SRW.USER_EXIT(RWECOP PAGE_FOR_INDEX
         P_START_PAGENO);
         SRW.MESSAGE(2,TO_CHAR(:P_START_PAGENO));
    END IF;
    SRW.GET_PAGE_NUM(PAGE_NO);
    CMD_LINE := INSERT INTO SHIP VALUES
                          (||SORT_CHAR||,||TO_CHAR(PAGE_NO)||);
    SRW.MESSAGE(2,CMD_LINE);
    SRW.DO_SQL(CMD_LINE);
    COMMIT;
    EXCEPTION
      WHEN DUP_VAL_ON_INDEX THEN
            NULL;
      WHEN SRW.DO_SQL_FAILURE THEN
            SRW.MESSAGE(1,FAILED TO INSERT ROW INTO SHIP TABLE);
      WHEN OTHERS THEN
           COMMIT;
    END;

  • How to Use Dynamic SQL

    Can anybody please send me a small program on How to Use Dynamic SQL.
    How to execute and run give details.
    Thanks
    null

    You can certainly use the INTO (and USING) clauses of EXECUTE IMMEDIATE to pass in and return data, i.e.
    EXECUTE IMMEDIATE sqlStmt
      USING variable1, variable2
       INTO output1, output2The more complex the statement, however, the more appropriate DBMS_SQL is. DBMS_SQL also has the potential to allow you to use bind variables rather than reparsing the statement many times.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Delcare Cursor using Dynamic SQL using PL/SQL in Oracle 7.3.4

    In Oracle 7.3.4, can I declare a cursor at run time using Dynamic SQL. From the sample code in this website, it seems that Oracle 8 support this function. Please help. Thanks a lot.
    If I can do this on Oracle 7.3.4, could you give me some sample codes? Thanks.
    Regards,
    Raymond

    Hi,
    Try using the the following code where you can dynamically build the Valid Select stmt. and call that where ever you want.
    declare
    Type Cur_ref Is Ref Cursor;
    C_ref Cur_ref;
    V_Str Varchar2(100);
    V_Name Varchar2(100);
    Begin
    V_Str := 'Select Ename from Scott.emp Where empno = 7369';
    Open C_Ref for V_Str;
    Fetch C_ref Into V_Name;
    close C_Ref;
    dbms_output.put_line(V_Name);
    End;
    regards
    gaurav
    null

  • How to extend VO which is use in VIEW LINK and VL is created dynamically.

    Hi All,
    I wants to extend VO.
    This VO is used in VIEW LINK.
    This VL name set dynamically, conditionally in one of the controller of page.
    i.e if some condition satisfied than xyz VL will use otherwise abc VL will use.
    Now,
    I have extend VO as well as VL and substitute both, but I am getting null value for some of the field and also I am not able to insert/update new value.
    So,
    I have created VORowImpl class file which extend VOROWImpl of seeded file and chage the row class of VO.xml file to new class. i.e. modified seeded .xml code and achieve what I want.
    But Is this correct way ?
    Is there any other way ?
    --Tushar Topiwala                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi pratap,
    thanx for your reply.
    intially i've done that also. i.e. extend only VO and substitute it but i'm getting null values in some field as well as nt able to insert/update new value.
    the error is related to VL.
    --tushar topiwala                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • Error while validating Calculated Column

    Hi Frzz, I have created a Calculated column of type NVARCHAR by performing some calculation on a filed whose data type is NVARCHAR. But while validating the view am getting an error " Attribute type is not valid" Could some one please help me why am

  • I can't figure out how to delete the blank page at the bottom of my spreadsheet.

    I am new to Numbers and not very experienced in spreadsheets period. Anyway, I made a what is supposed to be a one page spreadsheet and it worked out fine but there is this second page that has about a half page worth of blank cells and I cant figure

  • Generating a PDF programatically with precision placement...

    I have a coworker who is creating a poster-sized calendar in Illustrator.  Imagine a calendar with 100 events on it, each represented by a rectangle containing text describing the event, and some other details, in a nice typeface, and a few other sim

  • Mini to nano???

    i have an original mini and have already payed to replace it through apple and i was wondering since the mini is no longer on the production line, if i could get a 4 gig nano instead. i don't care if it's used and refurbished but it would be a lot ea

  • Having issues with Lync meetings with external partners

    This is basically a new concept for us because Lync was used mostly for internal use. The last couple of times we tried to have a meeting with a non-Federated partner like a reseller giving a demo, they would send us a Lync invite and when I try to c