Retreiving a value from and SQL query
If anyone can give me sample code or pointers to retreive a value from an sql query, I'd be greatful.
Source code I've muddled together so far:
Class seqNumType = Class.forName(nameOfClass);
Constructor theConstructor = seqNumType.getConstructor(null);
Object seqNumInstance = theConstructor.newInstance(null);
String theStatement = "SELECT value INTO v_seqnum FROM DUAL;";
OracleCallableStatement ocs = (OracleCallableStatement)conn.prepareCall(theStatement);
ocs.registerOutParameter( 1, OracleTypes.NUMBER, 0);
Method method = seqNumInstance.getClass().getMethod("getORADataFactory", null);
seqNumInstance = ocs.getORAData(1, (ORADataFactory)method.invoke(null,null));
ocs.execute();
Problem with this seems to be the ORADataFactory isn't a method of the class, but as I'm thumbling around in the dark here a little, I've no idea where to go from here. Is this just generally overkill anyway?
Suggestions?
Cheers for any help.
Like this:
ResultSet resultSet=statement.executeQuery("SELECT * FROM TEST");
while(resultSet.next())
for(int i=0;i<resultSet.getMetaData().getColumnCount();i++)
System.out.print(resultSet.getObject(i+1).toString()+" ");
System.out.println();
Similar Messages
-
How to get the number value from Oracle SQL Query?
Hi All,
I have a query which will return the below output.
LINE_NUMBER STRING
10000 A,B,C,D
20000 X,Y,Z,D
80000 P,Q,R,A
130000 E,R,T,Y
210000 Y,R,G,H
1300000 F,H,Y,UThe above output i need to get only the number 1, 2, 8, 13, 21, 210 for each row. Can you give the solution for that?
ThanksAnother wild guess
SQL> with t as (
select '10000 A,B,C,D' str from dual union all
select '20000 X,Y,Z,D' str from dual union all
select '80000 P,Q,R,A' str from dual union all
select '130000 E,R,T,Y' str from dual union all
select '210000 Y,R,G,H' str from dual union all
select '1300000 F,H,Y,U' str from dual
select str, rtrim(regexp_substr(str,'\d+'),0) nums from t
STR NUMS
10000 A,B,C,D 1
20000 X,Y,Z,D 2
80000 P,Q,R,A 8
130000 E,R,T,Y 13
210000 Y,R,G,H 21
1300000 F,H,Y,U 13
6 rows selected. -
Script fails when passing values from pl/sql to unix variable
Script fails when passing values from pl/sql to unix variable
Dear All,
I am Automating STATSPACK reporting by modifying the sprepins.sql script.
Using DBMS_JOB I take the snap of the database and at the end of the day the cron job creates the statspack report and emails it to me.
I am storing the snapshot ids in the database and when running the report picking up the recent ids(begin snap and end snap).
From the sprepins.sql script
variable bid number;
variable eid number;
begin
select begin_snap into :bid from db_snap;
select end_snap into :eid from db_snap;
end;
This fails with the following error:
DB Name DB Id Instance Inst Num Release Cluster Host
RDMDEVL 3576140228 RDMDEVL 1 9.2.0.4.0 NO ibm-rdm
:ela := ;
ERROR at line 4:
ORA-06550: line 4, column 17:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
( - + case mod new not null <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
The symbol "null" was substituted for ";" to continue.
ORA-06550: line 6, column 16:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev su
But when I change the select statements below the report runs successfully.
variable bid number;
variable eid number;
begin
select '46' into :bid from db_snap;
select '47' into :eid from db_snap;
end;
Even changing the select statements to:
select TO_CHAR(begin_snap) into :bid from db_snap;
select TO_CHAR(end_snap) into :eid from db_snap;
Does not help.
Please Help.
TIA,
NischalHi,
could it be the begin_ and end_ Colums of your query?
Seems SQL*PLUS hs parsing problems?
try to fetch another column from that table
and see if the error raises again.
Karl -
How to pass the Bound values to VO SQL Query during runtime?
Hi all,
I have the following sql query;
SELECT NOTIFICATION_ID
FROM xx_NOTIFICATION_V
WHERE COMPANY = NVL(:1, COMPANY)
AND INITIATOR = NVL(:2,INITIATOR)
AND PAYGROUP = NVL(:3, PAYGROUP)
AND SOURCE = NVL(:4, SOURCE)
AND SUPPLIER_NAME = NVL(:5,SUPPLIER_NAME)
AND TRX_DATE BETWEEN NVL(:6,TRX_DATE)
AND NVL(:7,TRX_DATE)
If i click GO button on search page then it pass the selected Poplists values as a Bound values to VO Sql query at runtime after this I store the search results in a Table(Which is created by using New Region Wizard).
I want to pass the Bind parameter values to VO SQL query during runtime and :1,:2,:3,:4,:5,:6,:7 values are coming from Poplists.
I search through forum I found many threads regarding Bind Values but those all are passing ID's only not String(Varchar) values.
How to pass the Character values to VO Query.
Please anyone help me on this.
Thanks in Advance.Hi All,
Below one is the recent error Stack.
Exception Details.
oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT NOTIFICATION_ID
, COMPANY
, PAYGROUP
, SOURCE
, INITIATOR
, SUPPLIER_NAME
, TRX_DATE
FROM LMG_NOTIFICATION_V
WHERE COMPANY = NVL(:1,COMPANY)
AND INITIATOR = NVL(:2,INITIATOR)
AND PAYGROUP = NVL(:3,PAYGROUP)
AND SOURCE = NVL(:4,SOURCE)
AND SUPPLIER_NAME = NVL(:4,SUPPLIER_NAME)
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:544)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:366)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:328)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:920)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1536)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:363)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:330)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2121)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1562)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
at OA.jspService(OA.jsp:40)
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.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
at OA.jspService(OA.jsp:45)
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:627)
at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:515)
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3289)
at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:1207)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4146)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:567)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:537)
at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:614)
at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3253)
at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3240)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:411)
at oracle.apps.fnd.framework.webui.OAWebBeanBaseTableHelper.queryData(OAWebBeanBaseTableHelper.java:960)
at oracle.apps.fnd.framework.webui.beans.table.OATableBean.queryData(OATableBean.java:717)
at ls.oracle.apps.fnd.wf.worklist.webui.WorklistFindCO.processRequest(WorklistFindCO.java:78)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:518)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:366)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:328)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:920)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1536)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:363)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:330)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2121)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1562)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
at OA.jspService(OA.jsp:40)
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.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
at OA.jspService(OA.jsp:45)
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:627)
at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:515)
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3289)
at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:1207)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4146)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:567)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:537)
at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:614)
at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3253)
at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3240)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:411)
at oracle.apps.fnd.framework.webui.OAWebBeanBaseTableHelper.queryData(OAWebBeanBaseTableHelper.java:960)
at oracle.apps.fnd.framework.webui.beans.table.OATableBean.queryData(OATableBean.java:717)
at ls.oracle.apps.fnd.wf.worklist.webui.WorklistFindCO.processRequest(WorklistFindCO.java:78)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:518)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:366)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:328)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:920)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1536)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:363)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:330)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2121)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1562)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
at OA.jspService(OA.jsp:40)
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.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
at OA.jspService(OA.jsp:45)
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)
Please anyone help me on this?
Thanks -
How could I replace hard coded value in my sql query with constant value?
Hi all,
Could anyone help me how to replace hardcoded value in my sql query with constant value that might be pre defined .
PROCEDURE class_by_day_get_bin_data
in_report_parameter_id IN NUMBER,
in_site_id IN NUMBER,
in_start_date_time IN TIMESTAMP,
in_end_date_time IN TIMESTAMP,
in_report_level_min IN NUMBER,
in_report_level_max IN NUMBER
IS
bin_period_length NUMBER(6,0);
BEGIN
SELECT MAX(period_length)
INTO bin_period_length
FROM bin_data
JOIN site_to_data_source_lane_v
ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
JOIN bin_types
ON bin_types.bin_type = bin_data.bin_type
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >= in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time < in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data.bin_type = 2
AND bin_data.period_length <= 60;
--Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
--report.
DELETE FROM edr_class_by_day_bin_data;
SELECT site_to_data_source_lane_v.site_id,
site_to_data_source_lane_v.site_lane_id,
site_to_data_source_lane_v.site_direction_id,
site_to_data_source_lane_v.site_direction_name,
bin_data_set.start_date_time,
bin_data_set.end_date_time,
bin_data_value.bin_id,
bin_data_value.bin_value
FROM bin_data
JOIN bin_data_set
ON bin_data.bin_serial = bin_data_set.bin_serial
JOIN bin_data_value
ON bin_data_set.bin_data_set_serial = bin_data_value.bin_data_set_serial
JOIN site_to_data_source_lane_v
ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
AND bin_data_set.lane = site_to_data_source_lane_v.data_source_lane_id
JOIN (
SELECT CAST(report_parameter_value AS NUMBER) lane_id
FROM report_parameters
WHERE report_parameters.report_parameter_id = in_report_parameter_id
AND report_parameters.report_parameter_group = 'LANE'
AND report_parameters.report_parameter_name = 'LANE'
) report_lanes
ON site_to_data_source_lane_v.site_lane_id = report_lanes.lane_id
JOIN (
SELECT CAST(report_parameter_value AS NUMBER) class_id
FROM report_parameters
WHERE report_parameters.report_parameter_id = in_report_parameter_id
AND report_parameters.report_parameter_group = 'CLASS'
AND report_parameters.report_parameter_name = 'CLASS'
) report_classes
ON bin_data_value.bin_id = report_classes.class_id
JOIN edr_rpt_tmp_inclusion_table
ON TRUNC(bin_data_set.start_date_time) = TRUNC(edr_rpt_tmp_inclusion_table.date_time)
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >= in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time < in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data_set.start_date_time >= in_start_date_time
AND bin_data_set.start_date_time < in_end_date_time
AND bin_data.bin_type = 2
AND bin_data.period_length = bin_period_length;
END class_by_day_get_bin_data;In the above code I'm using the hard coded value 2 for bin type
bin_data.bin_type = 2But I dont want any hard coded number or string in the query.
How could I replace it?
I defined conatant value like below inside my package body where the actual procedure comes.But I'm not sure whether I have to declare it inside package body or inside the procedure.
bin_type CONSTANT NUMBER := 2;But it does't look for this value. So I'm not able to get desired value for the report .
Thanks.
Edited by: user10641405 on May 29, 2009 1:38 PMDeclare the constant inside the procedure.
PROCEDURE class_by_day_get_bin_data(in_report_parameter_id IN NUMBER,
in_site_id IN NUMBER,
in_start_date_time IN TIMESTAMP,
in_end_date_time IN TIMESTAMP,
in_report_level_min IN NUMBER,
in_report_level_max IN NUMBER) IS
bin_period_length NUMBER(6, 0);
v_bin_type CONSTANT NUMBER := 2;
BEGIN
SELECT MAX(period_length)
INTO bin_period_length
FROM bin_data
JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
site_to_data_source_lane_v.data_source_id
JOIN bin_types ON bin_types.bin_type = bin_data.bin_type
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >=
in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time <
in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data.bin_type = v_bin_type
AND bin_data.period_length <= 60;
--Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
--report.
DELETE FROM edr_class_by_day_bin_data;
INSERT INTO edr_class_by_day_bin_data
(site_id,
site_lane_id,
site_direction_id,
site_direction_name,
bin_start_date_time,
bin_end_date_time,
bin_id,
bin_value)
SELECT site_to_data_source_lane_v.site_id,
site_to_data_source_lane_v.site_lane_id,
site_to_data_source_lane_v.site_direction_id,
site_to_data_source_lane_v.site_direction_name,
bin_data_set.start_date_time,
bin_data_set.end_date_time,
bin_data_value.bin_id,
bin_data_value.bin_value
FROM bin_data
JOIN bin_data_set ON bin_data.bin_serial = bin_data_set.bin_serial
JOIN bin_data_value ON bin_data_set.bin_data_set_serial =
bin_data_value.bin_data_set_serial
JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
site_to_data_source_lane_v.data_source_id
AND bin_data_set.lane =
site_to_data_source_lane_v.data_source_lane_id
JOIN (SELECT CAST(report_parameter_value AS NUMBER) lane_id
FROM report_parameters
WHERE report_parameters.report_parameter_id =
in_report_parameter_id
AND report_parameters.report_parameter_group = 'LANE'
AND report_parameters.report_parameter_name = 'LANE') report_lanes ON site_to_data_source_lane_v.site_lane_id =
report_lanes.lane_id
JOIN (SELECT CAST(report_parameter_value AS NUMBER) class_id
FROM report_parameters
WHERE report_parameters.report_parameter_id =
in_report_parameter_id
AND report_parameters.report_parameter_group = 'CLASS'
AND report_parameters.report_parameter_name = 'CLASS') report_classes ON bin_data_value.bin_id =
report_classes.class_id
JOIN edr_rpt_tmp_inclusion_table ON TRUNC(bin_data_set.start_date_time) =
TRUNC(edr_rpt_tmp_inclusion_table.date_time)
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >=
in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time <
in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data_set.start_date_time >= in_start_date_time
AND bin_data_set.start_date_time < in_end_date_time
AND bin_data.bin_type = v_bin_type
AND bin_data.period_length = bin_period_length;
END class_by_day_get_bin_data; -
How to pass a value into a SQL Query?
Hi There,
I want to know if there is a possibility to pass a dynamic value in a sql query. For example I have a currency rate value (ex: rate = 1.319, 2.23 etc) which user wants to input when running the query (The rate is not taken from the system, so I cannot compare to any table column and pass it as a parameter).
And this rate has to be used in my query to do some calculation. Is this possible? The value :p_currency_rate doesn't work
Any ideas please?
Thank you,
PrathibhaSELECT DISTINCT
hou.name
,poh.segment1 po_num
,pol.line_num po_line_num
,poh.currency_code
--,trunc(poh.creation_date) po_creation_date
,pol.cancel_flag
,msi.segment1 item_num
,pol.unit_price
,round(cost.item_cost,5)
,round((&p_rate * pol.unit_price),5) "CONVERSION"
,(cost.item_cost - round((&p_rate * pol.unit_price),5)) difference
,pov.vendor_name
FROM
po.po_headers_all poh
,po.po_lines_all pol
,po.po_vendors pov
,hr.hr_all_organization_units hou
,inv.mtl_system_items_b msi
,bom.cst_item_costs cost
WHERE
poh.po_header_id = pol.po_header_id
and pov.vendor_id = poh.vendor_id
and poh.org_id = hou.organization_id
and hou.organization_id = :p_operating_unit
and poh.currency_code = :p_currency
and poh.creation_date between :po_creation_date_from and :po_creation_date_to
and poh.type_lookup_code = 'BLANKET'
and msi.inventory_item_id = pol.item_id
and cost.INVENTORY_ITEM_ID = pol.ITEM_ID
--and (cost.item_cost - pol.unit_price) <> 0
and (cost.item_cost - round((&p_rate * pol.unit_price),5)) <> 0
and cost.organization_id = 1
and msi.organization_id = 1
and cost.cost_type_id = 3 --- Pending cost type
and nvl(upper (pol.closed_code),'OPEN') not in('CANCELLED', 'CLOSED', 'FINALLY CLOSED', 'REJECTED')
and nvl(upper (poh.closed_code),'OPEN') not in('CANCELLED', 'CLOSED', 'FINALLY CLOSED', 'REJECTED')
and nvl(pol.cancel_flag, 'N') = 'N'
and &p_rate user parameter
I want this p_rate to be passed as a user parameter. -
Modes and Methods in Tag Query and SQL Query
Hi,
Can someone explain me about the modes available in <b>TAG Query and SQL Query.</b>
TAG Query has modes such as <b>Current, CurrentWrite, GroupList, History, HistoryEvent, ModeList, Statistics and TagList</b>
SQL Query i still have doubt on <b>FixedQuery with output , Modelist and TableList</b>
I also need to know why methods are used?
Thanks in advance
Regards
MuzammilI'll try to explain to the best of my knowledge :
<u><b>TagQuery</b></u>
<b>Current</b> : Gives you the current value of the Tag you are reading.
<b>CurrentWrite</b> : Let you write a Value as the Current Value of the Tag.
<b>GroupList</b> : Generally Tags are grouped under different groups. Returns you the name of the Groups.
<b>From the xMII Help Document :</b>
<b>History</b> : History Mode returns interpolated data. Interpolation can be accomplished by specifying either the # of rows desired or the retrieval resolution. If the mode is "History" and a value is provided for the Resolution parameter (which is in seconds), the connector will retrieve evenly-spaced values starting at the beginning of the time interval, up to the maximum # of rows specified in the RowCount parameter. If no value is provided for the Resolution parameter, the connector will return an evenly-spaced number of values based on the value of the RowCount parameter.
For example, if the time interval is 1 hour, Resolution is 15, and RowCount is 240, the connector will return evenly spaced values each 15 seconds, up to 240 values (which would span the entire hour).
If the time interval is 1 hour, Resolution is not provided or is set to zero, and RowCount is 120, the connector would return 120 evenly spaced values, at an effective interval of 30 seconds.
<b>HistoryEvent Mode</b> : The connector can provide historical values "as they were stored" the database. This mode provides no interpolation of values.
<b>Statistics Mode</b> : When retrieving data for statistical calculations, the connector utilizes the same techniques as in the "HistoryEvent" mode. It is important to note that the first two returning columns in the HistoryEvent query must be the timestamp and the value, in that order. The SAP xMII Statistical processor expects that order, or errors will occur. This ensures precision of statistical measurements, particularly time-weighted average, by using the exact storage time and values from the historical database. The SAP xMII system provides the statistical calculations.
<b>Modelist</b> : Basically returns the modes of the Query Available. The Data returned is same as the data in the Modes list in the Quert Template Editor.
<b>Taglist</b> : Returns all the Tags in the Datasource.
<u><b>SQL Query</b></u>
<b>Modelist</b> : Same as above.
<b>TableList</b> : List of all the tables in the database to which the connector connects.
Again from SAP xMII Help Documentation :
<b>FixedQueryWithOutput</b> : This mode is used to execute an Oracle stored procedure or function that returns a REF CURSOR as output. The position of the REF CURSOR is marked by a "?" in the query. For example:
<b>Create a table.</b>
<i>create table usage (id int, name varchar(50));
insert into usage (id, name) values (1, 'test1');
insert into usage (id, name) values (2, 'test2');
insert into usage (id, name) values (3, 'test3');
insert into usage (id, name) values (4, 'test4');
insert into usage (id, name) values (5, 'test5');
insert into usage (id, name) values (6, 'test6');
insert into usage (id, name) values (7, 'test7');
insert into usage (id, name) values (8, 'test8');</i>
<b>Define the stored procedure.</b>
<i>DROP PACKAGE foopkg;
CREATE PACKAGE foopkg IS
TYPE cursortype is ref cursor;
PROCEDURE test (mycursor in out cursortype);
END foopkg;
CREATE PACKAGE BODY foopkg IS
PROCEDURE test (mycursor in out cursortype) AS
BEGIN
open mycursor for select * from usage;
END;
END foopkg;
</i>
Define a query template for calling the stored procedure. Enter the following in the FixedQuery tab:
<b>call foopkg.test(?)</b>
This template returns all rows from the Usage table. -
How to retrieve the values from PL/SQL table types.
Hi Every one,
I have the following procedure:
DECLARE
TYPE t1 IS TABLE OF emp%ROWTYPE
INDEX BY BINARY_INTEGER;
t t1;
BEGIN
SELECT *
BULK COLLECT INTO t
FROM emp;
END;
This procedure works perfectly fine to store the rows of employee in a table type. I am not able to retrieve the values from Pl/SQL table and display it using dbms_output.put_line command.
Can anybody help me please!!!!!
Thanks
Ahmed.You mean, you can't add this
for i in t.first..t.last loop
dbms_output.put_line(t(i).empno||' '||t(i).ename||' '||t(i).job);
end loop;or you can't add this
set serveroutput onor maybe, you are working in third party application where dbms_output is not applicable at all?
You see, not able like very similar it is not working - both are too vague...
Best regards
Maxim -
When i am retreiving the values from the access table i am getting null val
hi all,
I comeacross the following problem,I connected my applet to the Access database with jdbc:odbc driver.
I am trying to retreive the values from the table.I am getting the result correctly when the same code with using applet it was giving the correct result.
when I am using an applet program it was giving the null value istead of the actual records.
can anybody tell me the reason why
thanks in advance
and also how to connect the databse in the webserver when i installed my applet in the client side
please give me some suggestions to do that
thankyou
lakshmanHi Krishna,
Can you please copy the code generated by ODI for creating your C$ table ?
i mean :- create table C$_0Entity ( from the operator log
Regards,
Rathish A M -
Get Number of rows from a sql query.
I am reading data from a sql query in a BLS transaction and I would like to know the number of rows returned.
Is there an easy way to do this without looping through the table?
Thanks JasperHi Jasper,
You can use the XPATH count function similar to this:
GetTagList.Results{count(/Rowsets/Rowset/Row)}
Kind Regards,
Diana Hoppe -
Re: How to converting from PL/SQL query to T-SQL query
How to converting from PL/SQL query to T-SQL query... Its Urgent
Download the
SQL Server Migration Assistant for Oracle. It will convert whole Oracle databases, or single queries or PL/SQL stored procedures.
With caution that If your database is using Collation which is case sensitive SSMA will not work.SSMA doesnt guarantees 100% for conversion of Queries/stored proc /database if it fails to do so for some queries you will have to do it manually.
But you can try
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
Returning operation, table and column from a sql query
Hi,
I am working on Oracle 10g and i have to do achieve something like this.
i have to create procedure or functions which will accept a SQL query and will return following :
1). Operation like 'SELECT', 'INSERT', 'UPDATE', 'DELETE' etc.
2). Column names
3). Table involved.
One way to achieve this would be through hard parsing of string which might be time consuming. So do we have any in-built oracle package or function for the same job ?
Regards,
Vikas KumarCheck for DBMS_SQL package and DESCRIBE_COLUMNS procedure in that package.
You might need a combination of this package and Hard parsing of the input string.
For operation you can trim any space and brackets using TRIM function and then you can extrcat first 6 characters using SUBSTR for Operation.
I have not worked or used DBMS_SQL so wont be able to help you much on this.
Here is the link for DBMS_SQL
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sql.htm#i1026120
Regards
Arun -
How do I Send in a value to the SQL Query Expression's variable created using Declare in Power Query
I have gone through the other posts where in a parameter is sent to query created by power query but my ask is a bit different.
I am using a sql query to retrieve data using Power query which has 2 variables declared in the DECLARE section in the query.
Ex:
declare @Name varchar(1000)
SET @Name= 'Alpha'
declare @location nvarchar(1000)
SET @location= 'Bravo'
Select * from Infotable where Name = @Name and location = @location.
Now in the following query I would want to send in the values for the declared variables using a table in my worksheet. I have followed the stuff present in the following post
http://blog.oraylis.de/2013/05/using-dynamic-parameter-values-in-power-query-queries/
but when using the value name (let Name_parameter = Excel.Currentworkbook(), Name_Value = Name_Parameter [0][value]) in the Advance Editor as mentioned in the above post I am being thrown an error stating Name_Value column doesn't exist.
I am having a tough time figuring out what the problem could be..I have gone through the other posts where in a parameter is sent to query created by power query but my ask is a bit different.
I am using a sql query to retrieve data using Power query which has 2 variables declared in the DECLARE section in the query.
Ex:
declare @Name varchar(1000)
SET @Name= 'Alpha'
declare @location nvarchar(1000)
SET @location= 'Bravo'
Select * from Infotable where Name = @Name and location = @location.
Now in the following query I would want to send in the values for the declared variables using a table in my worksheet. I have followed the stuff present in the following post
http://blog.oraylis.de/2013/05/using-dynamic-parameter-values-in-power-query-queries/
but when using the value name (let Name_parameter = Excel.Currentworkbook(), Name_Value = Name_Parameter [0][value]) in the Advance Editor as mentioned in the above post I am being thrown an error stating Name_Value column doesn't exist.
I am having a tough time figuring out what the problem could be.. -
APEX,PDF's, BI Publisher and SQL Query returning SQL code..
I don't know if I should be posting this in this Forum or the BI Publisher forum, so I am posting in BOTH forums..
I love APEX, let me say that first.. And appreciate the support offered here by the group, but am running int a confusing issue when BI Publisher tries to build a report from the above type APEX report..
Here is my dilemma:
I have a number of reports that are part of a Oracle package. They return an SQL Query back to a reports region on a page. I am having to deal with the column names returned are col01, col02..
The issue I have is, when building the Application Level query to download the XML sample from in building RTF layouts in Word, you can not use this code, you MUST use a standard SQL Select.
I have taken the sql from the function returning sql, and copied into the application query, supplying the required data values for bind variables being used in the query.
An XML file is produced, and I use this to build the RTF format file that I load back into APEX and try to use it for the PDF rendering of the report. I can view the output as a PDF in the Word add on, but when I try using it with the report, it is returning an empty PDF file.
Can anyone tell me what error log files on the bi publisher side I can look at to see what error is happening?
Thank you,
Tony Miller
UTMB/EHN
Title adjusted to allow people to know what I am talking about...
Message was edited by:
Tony MillerTony,
You can find the log as follows:
- go to http://[yourserver]:[yourport]/em
- logon to OC4J EM: oc4jadmin/[yourpassword]
- click on "logs" at the bottom of the page
- in the hgrid/tree, expand OC4J->home->Application
xmlpserver
- click on view log icon
You can also observe what's going on in BI Publisher
by going to the command prompt from where you started
it.
Or, as a third option, you can locate the file on
your file system, depending on your setup, the path
would be something similar to this:
\oracle\product\10.2.0\bip\j2ee\home\application-deplo
yments\xmlpserver\application.log
With that said though, I don't expect you'll find
much in there that would help with your particular
problem. I suspect you either get no rows in your XML
at runtime, due to some session state issues, or your
XML structure does in fact not match your RTF
template.
I'm not quite following your problem description,
i.e. when did you do what and are you associating
your report layout with a report query or report
region. So just some general notes, your query needs
to be parseable at design-time, when exporting the
XML, so that you get the XML file with the proper
column names derived from your query. If you want to
use your RTF template with a standard report region,
you must export the XML file first using the advanced
XML structure option. And of course the column names
in your report query need to match the column names
in your report region.
Perhaps this helps you further diagnose what's going
on, if you have additional information that could
help, let me know. And if you could stage this on
apex.oracle.com, I'd be happy to take a look.
Regards,
MarcMarc,
Thanks for looking at this issue. Below find my remarks to your questions..
Re: your query needs
to be parseable at design-time, when exporting the
XML, so that you get the XML file with the proper
column names derived from your query.At the start of this process, the query code was a function in a package. The function was returning an SQL select statement, for a report region on a page. I took the select statement, built an application query to build a sample of the xml for BI Publisher desktop (Add-on for Word). The code was producing the usual Col01, Col02.. since at design time that is were the column names.
When I then took the xml from this and built the rtf for loading into my APEX application.
When testing the Application Query with this RTF report layout, I am getting PDF's. When using it with the report region sending an xml feed to BI Publisher I am getting nothing back.
I have since taken the sql code and moved it back into the report region, and set the region to have a type of straight SQL Query. I have even tried to hard-code the parameters I was getting from the page to limit data returned.
Is it possible to see the xml being produced by the APEX page?
Re: Stage this on apex.oracle.com.. I would love to, but we would have HIPPA issues if I posted the data on a public website.
Can I send you the RTF file and the xml file that the application query is creating to see if there something weird about them?
Thank you,
Tony Miller
UTMB/EHN -
I don't know if I should be posting this in this Forum or the BI Publisher forum, so I am posting in BOTH forums..
I love APEX, let me say that first.. And appreciate the support offered here by the group, but am running int a confusing issue when BI Publisher tries to build a report from the above type APEX report..
Here is my dilemma:
I have a number of reports that are part of a Oracle package. They return an SQL Query back to a reports region on a page. I am having to deal with the column names returned are col01, col02..
The issue I have is, when building the Application Level query to download the XML sample from in building RTF layouts in Word, you can not use this code, you MUST use a standard SQL Select.
I have taken the sql from the function returning sql, and copied into the application query, supplying the required data values for bind variables being used in the query.
An XML file is produced, and I use this to build the RTF format file that I load back into APEX and try to use it for the PDF rendering of the report. I can view the output as a PDF in the Word add on, but when I try using it with the report, it is returning an empty PDF file.
Can anyone tell me what error log files on the bi publisher side I can look at to see what error is happening?
Thank you,
Tony Miller
UTMB/EHN
Title changed, maybe SOMEONE has an idea on this??
Message was edited by:
Tony MillerHi,
1/ first check you are passing the bind variables and
appropriate values in the call to your report - if
the query returns no data then you get an empty page
So if your query takes :P10_USERNAME variable then
pass it to the report in the URL
f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=YOUR_REP_QUERY_N
AME:::P10_USERNAME:MYUSER
2/ try to use the Default layout first to check your
report query really returns the data when called
3/ if you defined a header in your rtf template check
there is no & (ampersand) - if using & in the header
and preview the template from word it displays data
OK, but if you use this template in the report query
it fails to render the data (bug in Apex-> Bi
Publisher integration maybe?)
4/ If using the table in the rtf template check its
width does not overflow the page margins - there is a
problem with pdf export
5/ check
/oc4j/j2ee/home/application-deployments/xmlpserver/app
lication.log forthe information on BI Publisher runs
RadoIssue was in the APEX page having issues.. I recoded a new page and am able to generate BI Publisher based PDF files..
Thank you,
Tony Miller
UTMB/EHN
Maybe you are looking for
-
Hi, I am trying to create the DB link across two different platforms where 32 bit oracle is installed in 32 bit windows platform and 64 bit mysql is installed in 64 bit HP_UX platform. After the initial configuration, I finally execute the following
-
KA780G second network card doesn't work
Hi everybody, Today, I put an second network card on the KA780G board (it's for a round robin network), on a free PCI slot, and this card isn't recognised by Linux and Windows (in Windows XP, when the network card is connected, my graphical card wor
-
Iphone 4 won't turn on! Help Please!
my iphone4 suddenly turned off, now it won't turn on. connected it to itunes on laptop. tried to restore it but still stuck with "Waiting for iPhone" and an apple logo with a blank progress bar. Help please!
-
If I cancel my Adobe subscription, can I still access my data that is stored in the cloud? Just curious....and what about retrieving data from the cloud? How can that be accomplished?
-
CS5 can't search in built in help app
When I try to search in Adobe Help app it always says try again unexpected error occured.