Using a variable in SQL to store intermediate results
I'm new to Crystal Reports, so pardon my ignorance.
I need to write a SQL statement in Crystal Reports (Ver. 11) that uses results from a query and stores them in a variable for further use in the statement. Something like this:
DECLARE @my_variable INT;
SET @my_variable=
CASE
WHEN DATEPART (m,{?Date})<7
THEN DATEPART (yyyy,( DATEADD (year,-1, {?Date})))
ELSE DATEPART (yyyy,( DATEADD (year,0, {?Date})))
END
(Where {?Date} is a date parameter)
Is it possible to achieve this in the above form or some other form in Crystal Reports?
Thanks
Simple answer... When I used the variable, I marked it as a string. There is an email address setting.
Similar Messages
-
Using coldfusion variables in sql queries, some unexpected results.
I've come across a somewhat perplexing problem. I'd be
interested to see if the following works for other people:
<cfset sql_var = "'something','something else'">
<cfquery name="test" datasource="db">
select id from table where somename in (#sql_var#)
</cfquery>
As it is this produces a sql error - coldfusion tries to run
the query as
select id from table where somename in
(''something'',''something else'')
That's with double single quotes around each of the strings,
even though this wasn't specified in the variable sql_var.
So I tried this:
<cfset sql_var = "something','something else">
<cfquery name="test" datasource="db">
select id from table where somename in ('#sql_var#')
</cfquery>
Where variable sql_var only has single quotes in between the
two strings, and I've added single quotes to the select statement.
This produces no error, but no results either. The sql being run is
select id from table where somename in
('something','something else')
Which is exactly as it should be. I copy and paste the exact
same query into the database and it produces results - but when
coldfusion runs the query it doesn't. Running the query with no
quotes produces a sql error, which is what I wopuld expect.
Which leaves me somewhat at a loss. Anyone got any ideas?
Running CF 6.1 (I think) using a MySQL database, if that
makes any difference to anything.That's with double single quotes around each of the strings,
even though this wasn't specified in the variable sql_var.
In Coldfusion, 'something' and "something" are the same
thing. You should expect that Coldfusion could switch from one to
the other.
Where variable sql_var only has single quotes in between the two
strings, and I've added single quotes to the select statement. This
produces no error, but no results either. The sql being run is
select id from table where somename in
('something','something else')
I don't think that is the query being run. Before passing the
string, "something','something else", to the query Coldfusion will
automatically escape the single-quotes on either side of the comma.
That is the default behaviour. The resulting query is
select id from table where somename in
('something'',''something else')
To avoid these complications, use the function
PreserveSingleQuotes(). Thus,
<cfset sql_var = "'something','something else'">
<cfquery name="test" datasource="db">
select id from table where somename in
(#preservesinglequotes(sql_var)#)
</cfquery> -
Using Bind variables in SQL PLUS Report
using Bind variables in SQL PLUS Report. This report gets the arguments from the application concurrent program. Now my need is to convert the start_date and end_date to bind Variables to improve the performance. I have commented the original code in 'prompt List of Unapproved Adjustments' and used my Bind Variable but it is giving an error
error: Bind Variable "ENDING_DATE" not declared
Report Date and Time:
26-OCT-2010 15:44:13
List of Unapproved Adjustments
Bind Variable 'ENDING_DATE" not declared
Please see below the code for the sql plus report:
define p_org_id = '&1'
define p_fy_begin_date = '&2'
define p_start_date = '&3'
define p_end_date = '&4'
define p_conversion = '&5'
declare
variable begin_date date;
exec :begin_date := p_start_date;
variable ending_date date;
exec :ending_date := p_end_date;
/* Begin
:begin_date := to_date('&p_start_date','YYYY/MM/DD HH24:MI:SS');
:ending_date := to_date('&p_end_date','YYYY/MM/DD HH24:MI:SS');
End; */
set newpage none
set termout off
set pagesize 55
set linesize 180
set heading on
set feedback off
set wrap off
set space 1
set heading on
begin
dbms_application_info.set_client_info('&p_org_id');
end;
prompt
prompt Report Date and Time:
prompt ----------------------
select to_char(sysdate,'DD-MON-YYYY HH24:MI:SS')
from dual ;
prompt
prompt List of Unapproved Adjustments
prompt -------------------------------
select b.trx_number,
a.adjustment_number,
f.user_name created_by
from apps.ar_adjustments a,
apps.ra_customer_trx b,
apps.fnd_user f
where a.customer_trx_id = b.customer_trx_id
and a.status <> 'A'
and a.created_by = f.user_id
and a.creation_date between :begin_date
and :ending_date
-- and a.creation_Date between to_date('&p_start_date','YYYY/MM/DD HH24:MI:SS')
-- and to_date('&p_end_date','YYYY/MM/DD HH24:MI:SS')
order by
b.trx_number ;Hi
Please go to customization part of the report and verify..You have set a default value out there ..And also verify your lov and look at the values ..If it is again giving you the problem ..pl delete the report and develop it again from the scratch it will be solved...
vishnu
null -
Using bind variables with sql statements
We connect from a VB 6.0 program via OO4O to an Oracle 8.1.7 database, using bind variables in connection with select statements. Running ok, but performance again by using bind vars not as good as expected!
When looking into the table v$sqlarea, we were able to detect the reason. We expected that our program submits the sql statement with bind vars, Oracle parses this once, and with each select statement again, we do not have a reparse. But: It seems that with each new session Oracle reparses the sql statement, that is, Oracle is not able to memorize or cache bind vars and statements. Even more worrying, this kind of behaviour was visible with each new dynaset, but the same database/session.
Is there anybody our there with an idea of what is happening here?
Code snippet:
Dim OraSession As OracleInProcServer.OraSessionClass
Dim OraDatabase As OracleInProcServer.OraDatabase
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
Set OraDatabase = OraSession.OpenDatabase(my database", "my connect", 0&)
OraDatabase.Parameters.Add "my_bind", 0, ORAPARM_INPUT
OraDatabase.Parameters("my_bind").DynasetOption = ORADYN_NOCACHE
OraDatabase.Parameters("my_bind").serverType = ORATYPE_NUMBER ' Bind Var Type
Dim RS As OracleInProcServer.OraDynaset
strSQLstatement= "Select * from my_table where igz= [my_bind] "
Set RS = OraDatabase.CreateDynaset(strSQLstatement, &H4)
OraDatabase.Parameters("my_bind").Value = myValue
RS.Refresh
Cheers and thanks a lot :)
Michael SonntagWe connect from a VB 6.0 program via OO4O to an Oracle 8.1.7 database, using bind variables in connection with select statements. Running ok, but performance again by using bind vars not as good as expected!
When looking into the table v$sqlarea, we were able to detect the reason. We expected that our program submits the sql statement with bind vars, Oracle parses this once, and with each select statement again, we do not have a reparse. But: It seems that with each new session Oracle reparses the sql statement, that is, Oracle is not able to memorize or cache bind vars and statements. Even more worrying, this kind of behaviour was visible with each new dynaset, but the same database/session.
Is there anybody our there with an idea of what is happening here?
Code snippet:
Dim OraSession As OracleInProcServer.OraSessionClass
Dim OraDatabase As OracleInProcServer.OraDatabase
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
Set OraDatabase = OraSession.OpenDatabase(my database", "my connect", 0&)
OraDatabase.Parameters.Add "my_bind", 0, ORAPARM_INPUT
OraDatabase.Parameters("my_bind").DynasetOption = ORADYN_NOCACHE
OraDatabase.Parameters("my_bind").serverType = ORATYPE_NUMBER ' Bind Var Type
Dim RS As OracleInProcServer.OraDynaset
strSQLstatement= "Select * from my_table where igz= [my_bind] "
Set RS = OraDatabase.CreateDynaset(strSQLstatement, &H4)
OraDatabase.Parameters("my_bind").Value = myValue
RS.Refresh
Cheers and thanks a lot :)
Michael Sonntag -
Using SQLCMD variables in SQL Server Unit Test Project
Is it possible to use SQLCMD variables in my SQL Server Unit Test Project? In my test initialize script I'd like to set a database name variable, something like this:
:SETVAR MyDatabase "mydatabase"
SELECT * FROM [$(MyDatabase)].[mytable]
but I get syntax errors when I run the test. Any suggestions how I can get this to work.
Result Message: Initialization method
myTest.TestInitialize threw exception. System.Data.SqlClient.SqlException: System.Data.SqlClient.SqlException:
Incorrect syntax near ':'..Hi Kevin,
What is the error?
This should work only thing i could see is no scheme specified.
SQL Server uses dbo as default schema.
In your case:
:SETVAR MyDatabase "mydatabase"
SELECT * FROM [$(MyDatabase)].dbo.[mytable]
Also check your instance collation if its Case sensitive then specify database and table name as exact case.
Example:
:SETVAR MyDatabase "[mydatabase]"
:setvar schemavar "[dbo]"
:setvar tablevar "[mytable]"
SELECT * FROM $(MyDatabase).$(schemavar).$(tablevar) -
How to use substitution variable in sql
Hai All
I have two tables Rgpmain and Rgpitem the fields are
Rgpmain
unitid,periodid, docno, vendcode ,vendname, part_taken_by and .....
Rgpitem
unitid, periodid, docno, partno, partname .... And i need to give some values in runtime using sub variable
i need to to four values in sub function and i will give one value and i need the result of one variable
The qurey will like this
Select * from rgpmain m, rgpitem i where unitid=1 and periodid=14 and m.unitid=i. unitid and m.periodid= i.periodid and m.docno = i.docno and vendcode ='&p_vendcode'
Or
m.unitid=i. unitid and m.periodid= i.periodid and m.docno = i.docno and vendname like '&p_vendname%'
Or
m.unitid=i. unitid and m.periodid= i.periodid and m.docno = i.docno and partname like '&p_partname%'
or
m.unitid=i. unitid and m.periodid= i.periodid and m.docno = i.docno and partno ='&p_partno'
This is my query
And while i am executing there are four options showing to enter..
My need is i need enter only one field Ie vendcode and execute the vendcode like ABC01 then i need the only
the result that belong to vendcode ABC01 but my query giving all the rows
Pls tell me what is wrong with my query
Thanks In Advance
Srikkanth.MHai
Thanks Man i under stood that nv2 if 1 col is null then it will return 2 col or els 1 col but i working with large
database and i need four or five column using sub. Pls tell whats went wrong with my query when i am executing
one by one at the first time its works fine but next time it returns 1000 rows. pls tell me how to use four or five columns
Regards
srikkanth.M -
SQL Query - store the result for optimization?
Good day experts,
I am looking for advice on a report. I did a lot of analytic functions to get core data that I need to make my report and its takes around 50 min for SQL to complete. Now with this data I need to create 3 different reports and I cant use the same SQL since there is a lot of agregation (example would be group by product in one case and by client in 2nd). For each of those different group bys I need a different report.
So how to create 3 reports from 1 SQL query without running the query 3 times?
First thing that comes to mind is to store the result set into a dummy table and then query the table since the core data I get is around 300 rows and then do different group bys.
Best regards,
IgorSo how to create 3 reports from 1 SQL query without running the query 3 times?
You already know the obvious answer - store the data 'somewhere'.
The appropriate 'somewhere' depends on your actual business requirements and you did not provide ALL of them.
MV - if the query is always the same you could use an MV and do a complete refresh when you want new data. The data is permanent and can be queried by other sessions but the query that accesses the data will be frozen into the MV definition.
GTT (global temp table) - if a NEW data load AND the three reports will ALWAYS be executed by a single session and then the data is NOT needed anymore then a GTT can work. The query that loads the GTT can be different for each run but the data will only be available for a single session and ONLY for the life of that session. So if anything goes wrong and the session terminates the data is gone.
First thing that comes to mind is to store the result set into a dummy table and then query the table since the core data I get is around 300 rows and then do different group bys.
That is commonly referred to as a 'REPORT-READY table'. Those are useful when the data needs to be permanent and available to multiple sessions/users. Typically there is a batch process (e.g. package procedure) that periodically refreshes/updates the data during an outage window. Or the table can have a column (e.g. AS_OF) that lets it contain multiple sets of data and the update process leaves existing data alone and creates a new set of data.
If your core data is around 300 rows you may want to consider a report-ready table and even using it to contain multiple sets of data. Then the reports can be written to query the data using an AS_OF value that rolls up and returns the proper data. You don't need an outage window since older data is always available (but can be deleted when you no longer need it.
If you only need one set of data you could use a partitioned work table (with only one partition) to gather the new set of data and then an EXCHANGE PARTITION to 'swap' in the new data. That 'exchange' only takes a fraction of a second and avoids an outage window. Once the swap is done any user query will get the new data. -
Error using presentation variable in SQL Expression
Hi all,
I'm receiving an error - '...Error getting drill information...' due to a presentation variable being used in a SQL Expression. It probably has something to do with a data type issue. I've narrowed the error to the use of the presentation variable.
I'm setting a presentation variable, pres_mth_nme_to, from a dashboard prompt. The prompt contains a month name.
I'm using the presentation variable as part of a SQL Expression in a filter. The gist of the SQL Expression is to use the
presentation variable in a CASE and set a value accordingly. For example:
Column: Month Sort Value
Operator: Between
Value: *10*
SQL Expression: *Case @{pres_mth_nme_to}{some default} WHEN 'NOV' THEN '10' WHEN 'DEC' THEN '11' WHEN 'JAN' THEN '12' WHEN 'FEB' THEN '13' WHEN...END*
The month name is character. If I were to hard code this, I don't recieve the error. For example:
CASE 'SEP' WHEN 'NOV' THEN '10' WHEN 'DEC' ...END
There something going on with the data type from the prompt and it being used in the comparison. If I use a CAST, the problem still exists.
CASE CAST(@{pres_mth_nme_to} as char(3)) WHEN 'NOV' THEN ... END
If I'm in Answers, the problem doesn't exist, I'm assuming because of the default values. If I'm on the dashboard, it does exist, I'm assuming because of recieving the prompt value.
I don't know what I'm missing. Any suggestions?
Thanks.DJ,
if the formula presented by you is exactly true, i mean it was not fabricated to present as an example in the forum, you should include the presentation variable in single quotes.
i.e. your formula must look somthing like
Case '@{pres_mth_nme_to}{some default}' WHEN 'NOV' THEN '10' WHEN 'DEC' THEN '11' WHEN 'JAN' THEN '12' WHEN 'FEB' THEN '13' WHEN...END
let me know if it did solve the issue...
-bifacts
http://www.obinotes.com
Edited by: bifacts on Oct 25, 2010 1:50 PM -
Decode using bind variable in SQL
I have decode statement in my SQL query which is used to define the VO object. I want to select a column depending on the value entered for the bind variable :1. dont know how to implement this in OAF - any pointers will be appreciated.
decode(:1,'XO2C_CUST_SERV_REP',XO2C_CUST_SERV_REP,'XO2C_ACCOUNT_MGR',XO2C_ACCOUNT_MGR,'XO2C_CTS_ENGINEER',XO2C_CTS_ENGINEER ) "contact names"
Thanks!!I have decode statement in my sql for the VO and the VO is executed when the user clicks the GO button(user initiated search and over-riding the default Go button).
When I click the Go button , I am calling a method called Uneditable in my AM which appends the decode variable using the whereclause append but it is failing with an exception "java.sql.SQLException: Missing IN or OUT parameter at index:: 1". Can someone let me know if I am doing anything indifferently which is causing the program/sql query to fail.
Binding style of the VO is "Oracle Named" - is this causing the problem?
ProcessFormRequest:
=============
if ("ClickGo".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
OAApplicationModule am = pageContext.getApplicationModule(webBean);
System.out.println("Go Button pressed>> "+am);
OATableBean table = (OATableBean) webBean.findChildRecursive("USSContactMainVO1");
System.out.println("before QueryData");
//table.queryData(pageContext,false);
System.out.println("before Boolean executeQry");
Boolean executeQuery = BooleanUtils.getBoolean(false);
System.out.println("Get PartyName");
String v_PartyName = pageContext.getParameter("xxPartyName");
System.out.println("Get SalesContactQry");
String v_SalesContact = pageContext.getParameter("SalesContact_qry");
System.out.println("Party Name :" + v_PartyName + " Sales contact:" + v_SalesContact);
Serializable[] parameters = {v_PartyName, v_SalesContact,executeQuery };
Class[] paramTypes = { String.class, String.class, Boolean.class };
am.invokeMethod("uneditable",parameters,paramTypes);
Uneditable(AM)
=========
public void uneditable(String v_PartyName, String v_SalesContact,
Boolean executeQuery){
System.out.println("Im in uneditable..to call VO");
USSContactMainVOImpl vo1= getUSSContactMainVO1();
String Voqry =vo1.getQuery();
//System.out.println("Query is :"+ Voqry);
StringBuffer whereClause = new StringBuffer(100);
Vector parameters = new Vector(3);
int clauseCount = 0;
int bindCount = 0;
System.out.println("debug1");
vo1.setWhereClauseParams(null); // Always reset
System.out.println("check the params");
if ((v_SalesContact != null) && (!("".equals(v_SalesContact.trim()))))
System.out.println("Sales:"+v_SalesContact);
whereClause.append(v_SalesContact);
System.out.println("bindcount");
whereClause.append(++bindCount);
clauseCount++;
System.out.println("setWhereclas");
vo1.setWhereClause(whereClause.toString());
System.out.println("setWhereclasParam");
vo1.setWhereClauseParams(null);
System.out.println("setWhereclasParam-2");
vo1.setWhereClauseParam(0,v_SalesContact);
if ((v_PartyName != null) && (!("".equals(v_PartyName.trim()))))
whereClause.append(" Party_Name like :");
whereClause.append(++bindCount);
clauseCount++;
vo1.setWhereClause(whereClause.toString());
vo1.setWhereClauseParams(null);
//vo1.setWhereClauseParam(0,v_PartyName);
vo1.setWhereClauseParam(1,v_PartyName);
System.out.println("Query is :" + vo1.getQuery()); //prints this debug msg but fails while executnig the vo
vo1.executeQuery();
Row[] rows1=vo1.getAllRowsInRange();
USSContactMainVORowImpl row = null;
for (int i = 0; i < rows1.length; i++)
System.out.println(" Rows Found "+i);
row = (USSContactMainVORowImpl)rows1;
row.setAttribute("CTSEngineer_TR",Boolean.FALSE);
//end of uneditable
It appends the 2nd parameter and prints System.out.println("Query is :" + vo1.getQuery()) without any issues but think fails when trying to execute the VO.
Error Stack :
=======
oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT hp.party_name,hp.party_number registry_id, hps.party_site_number Site_Number, hca.account_number,
hca.account_name acc_desc,
hl.address1
|| ''
|| hl.city
|| ''
|| hl.postal_code
|| ''
|| hl.state "Address",
xagv.xo2c_entering_unit "Entering_Unit",
DECODE(hou.Short_code,'USS CA OU','CA','USS USA OU','US') "Operating_Unit",DECODE('.',null,null) "CTS", DECODE(:1,'Customer Service Rep',XO2C_CUST_SERV_REP,'Account Manager',XO2C_ACCOUNT_MGR,'CTS Engineer',XO2C_CTS_ENGINEER ) "Contact Names" FROM hz_parties hp,
hz_party_sites hps,
hz_cust_accounts hca,
hz_cust_acct_sites_all hcs,
hz_locations hl,
xo2c_ship_to_sales_o_agv xagv,
hr_operating_units hou
WHERE 1 = 1
AND hp.party_id = hps.party_id
AND hp.party_id = hca.party_id
AND hcs.party_site_id = hps.party_site_id
AND hca.cust_account_id = hcs.cust_account_id
AND hps.location_id = hl.location_id
AND hcs.status = 'A'
AND xagv.party_site_id = hps.party_site_id
AND xagv.party_site_id = hcs.party_site_id
AND hou.ORGANIZATION_ID=hcs.ORG_ID) QRSLT WHERE (CTS Engineer1 Party_Name like :2)
at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source)
at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source)
at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(Unknown Source)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(Unknown Source)
at xxuss.oracle.apps.xo2c.contactmaintenance.webui.USSContactMainCO.processFormRequest(USSContactMainCO.java:105)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at OA.jspService(_OA.java:71)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
## Detail 0 ##
java.sql.SQLException: Missing IN or OUT parameter at index:: 1
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1566)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2996)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3043)
at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:857)
at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:666)
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3655)
at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(Unknown Source)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:742)
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:891)
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:805)
at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:799)
at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3575)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(Unknown Source)
at xxuss.oracle.apps.xo2c.contactmaintenance.server.USSContactMainAMImpl.uneditable(USSContactMainAMImpl.java:244)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(Unknown Source)
at xxuss.oracle.apps.xo2c.contactmaintenance.webui.USSContactMainCO.processFormRequest(USSContactMainCO.java:105)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at OA.jspService(_OA.java:71)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
java.sql.SQLException: Missing IN or OUT parameter at index:: 1
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1566)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2996)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3043)
at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:857)
at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:666)
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3655)
at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(Unknown Source)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:742)
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:891)
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:805)
at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:799)
at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3575)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(Unknown Source)
at xxuss.oracle.apps.xo2c.contactmaintenance.server.USSContactMainAMImpl.uneditable(USSContactMainAMImpl.java:244)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(Unknown Source)
at xxuss.oracle.apps.xo2c.contactmaintenance.webui.USSContactMainCO.processFormRequest(USSContactMainCO.java:105)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at OA.jspService(_OA.java:71)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Edited by: MyOAF on Jan 14, 2010 11:03 PM -
Using substitution variable in sql -- Issue
Hello All
I am trying to do a sql operation from command prompt of my system and that sql requires substitution variable which i am passing it but when i pass the variable ( there are two) the first one assign as " \c" and second gets both what i am passing.
I am not sure what exactly happening here, i have done this on AIX but here its not working any ideas?
System : uname -a
Linux ## 2.6.18-128.1.1.el5 #1 SMP Mon Jan 26 13:58:24 EST 2009 x86_64 x86_64 x86_64 GNU/LinuxAIX and Linux are not the same. An output of "\c" may indicate a compatibility issue of your shell script with your current command line interpreter (shell). A \c can be used to suppress a newline with the echo command. Bash understands both formats echo -n and echo \c, but other shells like Ksh don't. Try to run your script under a Bash, which is the default under Linux. If the problem persists you will need to post your script for any further analysis.
-
Error using bind variables with SQL server with SQL92 mode
I am using 2 bind variable in my VO (JDBC positional) . The mode is SQL 92 for ADF BC. I do not use the bind variable directly but in a view criteria. I see following error in the logs.
The logs show the query executed and error. I tried both ways - making bind variable required and not required. I have set -Djbo.SQLBuilder=SQLServer property. My other page works which has an updatable VO.
JDEV version is - JDEVADF_11.1.1.7.0_GENERIC_130226.1400.6493
<ViewObjectImpl> <getQueryHitCount> [4567] Estimated Row Count for ViewObject: [oracle.epm.fm.bc4j.queries.admin.UserOnSystemROVO]AdministrationAM.UserOnSystemROVO1, Query Statement:
<ViewObjectImpl> <getQueryHitCount> [4568] "SELECT count(1) FROM (SELECT * FROM (SELECT
TABLE1.SUSERNAME USERNAME,
TABLE2.SMODULENAME MODULENAME,
TABLE2.LACTIVITYCODE ACTIVITYCODE,
TABLE2.DSTARTTIME STARTTIME,
TABLE2.SSERVERNAME SERVERNAME,
TABLE2.SAPPNAME APPNAME,
TABLE2.LSESSIONID SESSIONID,
TABLE2.LSESSIONSTATUS SESSIONSTATUS,
TABLE2.LUSERID USERID,
TABLE2.DSTILLALIVETS STILLALIVETS,
TABLE2.LTASKID TASKID,
TABLE2.SACTIVITYDESC ACTIVITYDESC,
TABLE1.LUSERID USERID1,
TABLE1.SUSERDESC USERDESC
FROM
TABLE2 TABLE2,
TABLE1 TABLE1
WHERE
TABLE2.LUSERID = TABLE1.LUSERID) QRSLT WHERE ( ( ( ( UPPER(SERVERNAME) = UPPER(?) ) OR ( ? IS NULL ) ) AND ( ( UPPER(APPNAME) = UPPER(?) ) OR ( ? IS NULL ) ) ) )) ESTCOUNT"
<ViewObjectImpl> <getQueryHitCount> [4569] Bind params for ViewObject.getQueryHitCount: UserOnSystemROVO1
<ViewRowSetImpl> <doSetWhereClauseParam> [4570] UserOnSystemROVO1 ViewRowSetImpl.doSetWhereClause(0, null, null)
<ViewRowSetImpl> <doSetWhereClauseParam> [4571] UserOnSystemROVO1 ViewRowSetImpl.doSetWhereClause(1, null, null)
<ViewRowSetImpl> <doSetWhereClauseParam> [4572] UserOnSystemROVO1 ViewRowSetImpl.doSetWhereClause(4, null, null)
<ViewRowSetImpl> <doSetWhereClauseParam> [4573] UserOnSystemROVO1 ViewRowSetImpl.doSetWhereClause(5, null, null)
<ViewRowSetImpl> <doSetWhereClauseParam> [4574] UserOnSystemROVO1 ViewRowSetImpl.doSetWhereClause(2, null, null)
<ViewRowSetImpl> <doSetWhereClauseParam> [4575] UserOnSystemROVO1 ViewRowSetImpl.doSetWhereClause(3, null, null)
<ADFLogger> <addContextData> Estimated row count
<BaseSQLBuilderImpl> <bindParamValue> [4576] Binding null of type 12 for 1
<BaseSQLBuilderImpl> <bindParamValue> [4577] Binding null of type 12 for 2
<BaseSQLBuilderImpl> <bindParamValue> [4578] Binding null of type 12 for 3
<BaseSQLBuilderImpl> <bindParamValue> [4579] Binding null of type 12 for 4
<BaseSQLBuilderImpl> <bindParamValue> [4580] Binding null of type 12 for 5
<ViewObjectImpl> <getQueryHitCount> [4581] ViewObjectImpl.getQueryHitCount failed...
<ViewObjectImpl> <getQueryHitCount> [4582] java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver]Invalid parameter binding(s).
at weblogic.jdbc.sqlserverbase.dda4.b(Unknown Source)
at weblogic.jdbc.sqlserverbase.dda4.a(Unknown Source)
at weblogic.jdbc.sqlserverbase.dda3.b(Unknown Source)
at weblogic.jdbc.sqlserverbase.dda3.a(Unknown Source)
at weblogic.jdbc.sqlserverbase.ddb8.a(Unknown Source)
at weblogic.jdbc.sqlserverbase.ddb9.a(Unknown Source)
at weblogic.jdbc.sqlserverbase.ddb9.setNull(Unknown Source)
at weblogic.jdbc.wrapper.PreparedStatement.setNull(PreparedStatement.java:622)
at oracle.jbo.server.BaseSQLBuilderImpl.bindParamValue(BaseSQLBuilderImpl.java:2215)
at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3687)
at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:22684)
at oracle.jbo.server.ViewObjectImpl.getQueryHitCount(ViewObjectImpl.java:4944)
at oracle.jbo.server.ViewObjectImpl.getQueryHitCount(ViewObjectImpl.java:4857)
at oracle.jbo.server.QueryCollection.getEstimatedRowCount(QueryCollection.java:4204)
at oracle.jbo.server.ViewRowSetImpl.getEstimatedRowCount(ViewRowSetImpl.java:2677)
at oracle.jbo.server.ViewObjectImpl.getEstimatedRowCount(ViewObjectImpl.java:10632)After making all the bind variables not required, the error is no longer coming.
-
Can we use repository variables in SQL statement of column prompt?
Hi Dudes,
Below is the query
SELECT "- End Date"."End Fiscal Year" FROM "Consumer Sector" WHERE ("- End Date"."End Fiscal Year" = valueof (current_year)) or ("- End Date"."End Fiscal Year" = valueof (current_year) -1)
when use this sql in criteria prompt getting error.
Please suggest .
thanks.sriMake sure your syntax is correct it should be like VALUEOF("CURRENT_YEAR")-1
If you still have issues then VALUEOF("CURRENT_YEAR")-1 cast it to int before you subtract.
If helps pls mark as correct else let share error message -
Use of variables in SQL statements
Hi,
I am looking for for a way to set a variable which will be referenced several times within a UNION query.
Something like:
Var=3
SELECT * FROM VIEW_1 WHERE FIELD_1 = Var
UNION
SELECT * FROM VIEW_2 WHERE FIELD_1 = Var
UNION
SELECT * FROM VIEW_3 WHERE FIELD_1 = Var
Instead of something like:
SELECT * FROM VIEW_1 WHERE FIELD_1 = 3
UNION
SELECT * FROM VIEW_2 WHERE FIELD_1 = 3
UNION
SELECT * FROM VIEW_3 WHERE FIELD_1 = 3I'm sure that for this you were requiring a database solution and not a sqlplus solution ? If so, then you have a couple of options:-
1) change the Var to a function call and have the function return a packaged variable or value in a lookup table that you can set as you require [ i.e. WHERE FIELD_1 = your_function ].
2) use an application context, such that you set an attribute within the context and use it within the view [ i.e. WHERE FIELD_1 = SYS_CONTEXT( 'your_context', 'your_attribute' ) ].
In both methods, you will need to set the value of your variable before referencing the view. The view therefore becomes "parameterised" in this sense.
It might be possible that your view is mergeable. By this I mean that Oracle might be able to push a predicate against the view inside it instead, such that Oracle rewrites this:-
SELECT <cols>
FROM your_union_view
WHERE field_1 = 3;
...and takes that value of field_1 = 3 and "pushes" it into your_union_view itself, in which case you will not need to worry about any of the above solutions. You can test this out by removing the where clauses from your view definition and running an explain plan against a query of the form above. If you see a "VIEW" step in the results, then the view is not mergeable in its current form and you should revert to the methods I listed.
Regards
Adrian
For this you can use application contexts -
Using a Collection of beans to store a result set help.
Does anyone have any sample code on the subject? This is something I wrote up, but I wanted feedback, and also an example of how to retreive data out of the array of beans in jsp
package beanpersonal;
import beandatabase.DBConnection;
import java.sql.Connection;
import java.sql.SQLException;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
import java.util.Collection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
public class PersonNew {
public PersonNew() { }
public Collection getPersondata( String alias, String password ) {
Connection conn = null;
PreparedStatement stmt = null;
ResultSet rs = null;
Collection retValue = new ArrayList();
String query = "SELECT * FROM person WHERE (alias = ?, password = ?)";
try {
conn = DBConnection.getDBConnection();
stmt = conn.prepareStatement( query );
stmt.setString( 1, alias );
stmt.setString( 2, password );
rs = stmt.executeQuery();
while (rs.next()) {
PersonalInfo beanrow = new PersonalInfo();
beanrow.setAlias(rs.getString("alias"));
beanrow.setPassword(rs.getString("password"));
retValue.add(beanrow);
return retValue;
catch( SQLException sqle ) {
//sqle.printStackTrace();
//throw new ApplicationSpecficException("Cannot query db", sqle);
throw new RuntimeException(sqle);
finally {
try {if (rs != null) rs.close();} catch (SQLException e) {}
try {if (stmt != null) stmt.close();} catch (SQLException e) {}
try {if (conn != null) conn.close();} catch (SQLException e) {}
}sorry i only view the codes, but don't read it as a whole maybe this codes can help you..
jsp:
<%@ page contentType="text/html;charset=windows-1252"%>
<%@page import="java.util.*,mypackage.TestBean"%>
<%
String name = request.getParameter("name")!=null?request.getParameter("name"):"";
String age = request.getParameter("age")!=null?request.getParameter("age"):"";
System.out.println(name);
System.out.println(age);
Collection col = new ArrayList();
col = (Collection)session.getAttribute("col")!=null?(Collection)session.getAttribute("col"):new ArrayList();
TestBean tBean = new TestBean();
if(!name.equals(""))
tBean.setName(name);
if(!age.equals(""))
tBean.setAge(age);
if(!age.equals("") || !name.equals(""))
col.add(tBean);
session.setAttribute("col",col);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
<title>untitled</title>
</head>
<body>
<form>
<table cellspacing="0" cellpadding="0" border="1" width="200">
<tr>
<td>Name</td>
<td>
<input type="text" name="name"/>
</td>
</tr>
<tr>
<td>Age</td>
<td>
<input type="text" name="age"/>
</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="Submit"/>
</td>
</tr>
</table>
<%
if(col.size()>0){
Iterator iter = col.iterator();
%>
<table cellspacing="0" cellpadding="0" border="1" width="200">
<tr>
<td>
NAME
</td>
<td>
AGE
</td>
</tr>
<%while(iter.hasNext()){
tBean = (TestBean)iter.next();
%>
<tr>
<td>
<%=tBean.getName()%>
</td>
<td>
<%=tBean.getAge()%>
</td>
</tr>
<%}%>
</table>
<%}%>
</form>
</body>
</html>TestBean.java
package mypackage;
public class TestBean
private String name;
private String age;
public TestBean()
public String getName()
return name;
public void setName(String name)
this.name = name;
public String getAge()
return age;
public void setAge(String age)
this.age = age;
} -
Using calculation variables in OBIEE analysis
Hi,
I have a report where I have to calculate various ratios, including forecast calculations. If I write a pseudocode for this, it will involve several variables (intermediate step values).
In BO, we have concept of variables in Webi to store intermediate results. Is there anything similar in OBIEE which we can use ? Can you please help.
ThanksHi,
Global variables will work in the same way as local variables so you are using them correctly.
Business rules are just really glorified calc scripts, if you want to know about calc script commands have a read of the tech ref :- http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_techref/frameset.htm?launch.htm
It will have all the calculation commands and functions and descriptions on how they work.
Cheers
John
http://john-goodwin.blogspot.com/
Maybe you are looking for
-
Compiz Standalone, annoying screen flicker with OpenGL apps
I am using the Nvidia proprietary drivers. Whenever I'm running an OpenGL app, such as virtualbox, and I try to change viewports, the screen goes black for an entire second or two. Help?
-
HT4623 How do I transfer photos from old iPad to iPad 2?
I have an old iPad without icloud
-
24" Case Warping??
My 24" iMac has a new problem, the white plastic on the front, directly above where the optical drive sits, has began warping. If i push on it up and down the length of the right side of the panel, it will go a few millimeters before it reaches the L
-
Hi, The case is , my android mobile browser seems have virus, can I do something to fix it ? https://db.tt/FUDxyQ5G The link is my screen cap It is the mobile built in Internet browser, although It is not relate with mozilla, hope brothers can give m
-
SEQUENCE OF NUMBERING SCHEME IS TO BE CHANGED.
Hi All, In iProcurement contracts we have the possibility to use numbering schemes. After defining a numbering scheme we are able to use the defined scheme, when we define a contract template. When we activate the renumber button, the contract terms