Query to get the reference of table
Hi All,
I have a table DW_ORDER_CHANNEL and I need to know what are the other objects accessing this table.
As i need to alter this table so the dependent objects get invalid.
Can you please provide me the query how to get the dependent object on this table?
Thanks
Sid
Hi Sid,
Below query may be helpful for you.
SELECT *
FROM dba_dependencies d
WHERE d.referenced_name = -- Your table name;
Similar Messages
-
Query to get the data of all the columns in a table except any one column
Can anyone please tell how to write a query to get the data of all the columns in a table except one particular column..
For Example:
Let us consider the EMP table.,
From this table except the column comm all the remaining columns of the table should be listed
For this we can write a query like this..
Select empno, ename, job, mgr, sal, hiredate, deptno from emp;
Just to avoid only one column, I mentioned all the remaining ( 7 ) columns of the table in the query..
As the EMP table consists only 8 columns, it doesn't seem much difficult to mention all the columns in the query,
but if a table have 100 columns in the table, then do we have to mention all the columns in the query..?
Is there any other way of writing the query to get the required result..?
Thanks..Your best best it to just list all the columns. Any other method will just cause more headaches and complicated code.
If you really need to list all the columns for a table because you don't want to type them, just use something like...
SQL> ed
Wrote file afiedt.buf
1 select trim(',' from sys_connect_by_path(column_name,',')) as columns
2 from (select column_name, row_number() over (order by column_id) as column_id
3 from user_tab_cols
4 where column_name not in ('COMM')
5 and table_name = 'EMP'
6 )
7 where connect_by_isleaf = 1
8 connect by column_id = prior column_id + 1
9* start with column_id = 1
SQL> /
COLUMNS
EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,DEPTNO
SQL> -
SQL query to get the Datetime 06 hours prior to the table Datetime value
Hi Experts,
I'm just trying to create a SQL query to get the Datetime which should be 06 hours prior to my Table column value(Executiontime),
Eg: my Executiontime(column) value is 07:00AM means, this query should fetch the detail of first VMName from table at 01:00AM,
SQL Table Name: TestTable
Columns: VMName(varchar),status(varchar) Executiontime(Datetime)
SQL Query : Select Top 1 VMName from
TestTable where convert(date,Exeutiontime)=convert(date,getdate()) and
status='0' and ExecutionTime > dateadd(hour,6,getdate())
Request someone to alter this Query to my requirement or give me the new one.
Regards,
Sundar
SundarHi All,
Thanks for your Prompt response. I tried the below queries, but still I don't have any luck. Actually the queries are returning the value before the condition met (say when the time difference is more than 06 hours). I want the
query to return exactly @ 06 hour difference or less than 06 hours,
Query 01: Select Top 1 VMName from TestTable where
convert(date,Exeutiontime)=convert(date,getdate())
and status='0'
and ExecutionTime >
dateadd(hour,-6,getdate())
Query 02: Select
Top 1 VMName from TestTable where
status='0'
and ExecutionTime >
dateadd(hour,-6,getdate())
Query 03: Select
Top 1 VMName from TestTable where status='0'
and ExecutionTime >
dateadd(hour,-6,ExecutionTime)
Can someone point out the mistake please.
Regards,
Sundar
Sundar -
Needs Query to get the cycle time automatically based on the value provided in the UDF on OWOR table
Dear all,
Need a query to get the Cycle time in hr based on the value provide in the udf on OWOR table.
Details of UDF:-
1.Start date =10/07/14 (Field Name U_EA_REST)
2.Start time =10:00 (Field Name U_EA_REASTARTTIME)
3.End date =11/07/14 (Field Name U_EA_REET)
4.End Time=14:00 (Field Name U_EA_REAENDTIME
Cycle Time=_______ (Field Name U_EA_REACYCLETIME)
Regards,
BanugopanRajendranDear all,
Need a query to get the Cycle time in hr based on the value provide in the udf on OWOR table.
Details of UDF:-
1.Start date =10/07/14 (Field Name U_EA_REST) - Date Type
2.Start time =10:00 (Field Name U_EA_REASTARTTIME) - Hour Type
3.End date =11/07/14 (Field Name U_EA_REET) - Date Type
4.End Time=14:00 (Field Name U_EA_REAENDTIME - Hour Type
Cycle Time=_______ (Field Name U_EA_REACYCLETIME) - Hour Type
Regards,
BanugopanRajendran -
Need Store DB tables to query to get the latest scanned price at register
Need Store DB tables to query to get the latest scanned price at register.
Please provide a sample sql script that will help me do this. I need to have this informatino for several items at a time.
Thanks,
Edited by: user10133807 on Jan 13, 2012 9:22 AM
Edited by: user10133807 on Jan 13, 2012 9:23 AMHi,
You can find multiple items saled price at the register by running below quary
select distinct DC_DY_BSN,ID_ITM_POS,MO_PRN_PRC from TR_LTM_SLS_RTN;
Thanks,
MG -
Not able to get the reference fot the new column added thru personalization
Hi,
I have added a new column in an advanced table of Message Text Input. ID for this is xxTemp.
Now i have extended controller and in processrequest(), i am trying to get the reference for this column as below:
OAAdvancedTableBean oaadvancedtablebean1 = (OAAdvancedTableBean)webBean.findIndexedChildRecursive("ASNPrdtLstTb");
OAMessageTextInputBean oamessagetextinputbean = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("xxTemp");
But oamessagetextinputbean is returning null value.
Can someone tell me why this is not able to get the reference for the newly added column.
This is very urgent. please post me ur ideas.Hi Shiv,
I have used as u said. Its throwing this exception:
oracle.apps.fnd.framework.OAException: java.lang.ClassCastException
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:603)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.OASubTabLayoutHelper.processRequest(OASubTabLayoutHelper.java:430)
at oracle.apps.fnd.framework.webui.beans.layout.OASubTabLayoutBean.processRequest(OASubTabLayoutBean.java:465)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2335)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1734)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
at OA.jspService(OA.jsp:34)
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:39)
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.lang.ClassCastException
at dbdcustom.oracle.apps.asn.opportunity.webui.xxdbdPrdtTableCO.processRequest(xxdbdPrdtTableCO.java:76)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.OASubTabLayoutHelper.processRequest(OASubTabLayoutHelper.java:430)
at oracle.apps.fnd.framework.webui.beans.layout.OASubTabLayoutBean.processRequest(OASubTabLayoutBean.java:465)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2335)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1734)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
at OA.jspService(OA.jsp:34)
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:39)
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.lang.ClassCastException
at dbdcustom.oracle.apps.asn.opportunity.webui.xxdbdPrdtTableCO.processRequest(xxdbdPrdtTableCO.java:76)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.OASubTabLayoutHelper.processRequest(OASubTabLayoutHelper.java:430)
at oracle.apps.fnd.framework.webui.beans.layout.OASubTabLayoutBean.processRequest(OASubTabLayoutBean.java:465)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2335)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1734)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
at OA.jspService(OA.jsp:34)
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:39)
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) -
How can we get the reference of XML element on frame as soon as frame is created in Document?
Hi,
When ever we copy any text/table cells from any frame, and paste it directly on page, A new Frame is created and the pasted text is placed inside that frame.
Now to capture this frame creation, We have two possible solutions:
1) Attach Observer on Document 'kDocBoss' on IID_IHIERARCHY_DOCUMENT and it will notify on frame creation in update function.
2) Notification event on new story creation.
Now, I need to perform some changes in the newly created table, for example:
a) Need to delete XML tags from newly created frame
b) Need to perform action on table cells if any in the created frame.
But the problem is, when the event comes, I can access basic properties of frame like it's name, type etc, but it does not give me the
XML element on frame or tables in frame until the event is com pleat.
I know it's quite a specif requirement, but I guess many of you might have faced these kind of challenges, while processing the event.
Does any one has any idea how I can get the reference of XML element on frame as soon as it is created?Hi Kapoor,
please give also others a chance, and excuse that I get up late on vacation ;-)
Anyway, I'd keep the story creation responder to recognize the copy, then combine it with an observer on the backing xml story to catch the associated XML element which is created there. Something like below:
UIDRef xmlStoryRef = Utils<IXMLUtils>()->GetBackingStore(doc);
InterfacePtr<ISubject> subject ( xmlStoryRef,IID_ISUBJECT );
subject->AttachObserver(observer,IID_IIDXMLELEMENT,observer->GetAttachIID()); -
How to get the reference of the cell id in validate method in adf
Hi All,
I am using Jdeveloper 11.1.1.2 and i am using custom validator where i have registered the validator in facesconfig.xml.I need to know how can i get the ID of the inputtext box which is present in the hierarchy as Panel Header->Table->column->textbox :-
Below is my custom validator class source , please tell me how to get the reference of the textbox which is present in such hierarchy.:-
package validator;
import java.io.Serializable;
import java.util.Date;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.validator.Validator;
import javax.faces.validator.ValidatorException;
import oracle.adf.view.rich.component.rich.input.RichInputDate;
import oracle.adf.view.rich.component.rich.input.RichInputText;
import oracle.adfinternal.view.faces.bi.util.JsfUtils;
public class ValidateConversion implements Serializable, Validator {
public ValidateConversion() {
super();
public void validate(FacesContext facesContext, UIComponent uIComponent,
Object object) throws ValidatorException {
System.out.println("*************");
System.out.println((String)object);
//get component id by get("AttributeName");
String conversionComponentId = (String)uIComponent.getAttributes().get("UncommittedOrder_PH:t7:it14");
System.out.println("conversionComponentId=" + conversionComponentId);
RichInputText conversionComponent = (RichInputText)uIComponent.findComponent(conversionComponentId);
Integer conversion = (Integer)conversionComponent.getValue();
Integer quantityInBags = (Integer)object;
//get labels from the two inputDate component.
String conversionLabel = conversionComponent.getLabel();
String quantityInBagsLabel = ((RichInputText)uIComponent).getLabel();
Integer remainder = (quantityInBags % conversion);
//throw error if valiation fails
if (remainder > 0) {
throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
"The " + quantityInBagsLabel + " should be in multiples of" + conversion +".",
null));
Thanks,
Plese reply!!!Thanks Jabr,
This is my jsff page source and i need to find the reference of it14 which is the textbox :-
<af:panelGroupLayout id="pgl1" styleClass="AFStretchWidth">
<af:panelHeader text="Results" id="Results_PH" size="1">
<af:table value="#{bindings.queryProductResponseType.collectionModel}"
var="row"
rows="#{bindings.queryProductResponseType.rangeSize}"
emptyText="#{bindings.queryProductResponseType.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.queryProductResponseType.rangeSize}"
rowBandingInterval="1"
filterModel="#{bindings.queryProductResponseTypeQuery.queryDescriptor}"
queryListener="#{bindings.queryProductResponseTypeQuery.processQuery}"
filterVisible="true" varStatus="vs" id="ResultTable_t"
width="99%" partialTriggers="::cb1 ::cb2 ::cb3 it14"
binding="#{viewScope.GrowerOrderBean.resultTable}"
columnStretching="last" rowSelection="multiple"
sortListener="#{viewScope.GrowerOrderBean.sortResultTable_action}"
autoHeightRows="8" first="0"
inlineStyle="height:196px;margin:10px"
selectionListener="#{viewScope.GrowerOrderBean.resultRowSelect_action}">
<af:column filterable="false" sortable="false" headerText="Select"
id="c9" width="55" rendered="false"
filterFeatures="caseInsensitive">
<div align="center">
<af:selectBooleanCheckbox value="#{row.bindings.booleanFlag.inputValue}"
label="#{bindings.queryProductResponseType.hints.booleanFlag.label}"
required="#{bindings.queryProductResponseType.hints.booleanFlag.mandatory}"
shortDesc="#{bindings.queryProductResponseType.hints.booleanFlag.tooltip}"
id="it19" autoSubmit="true">
<f:validator binding="#{row.bindings.booleanFlag.validator}"/>
</af:selectBooleanCheckbox>
</div>
</af:column>
<!-- START of column created by SYSTIME -->
<af:column sortProperty="quantity" headerText="Quantity in Bags" filterFeatures="caseInsensitive"
id="c54" rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
filterable="true" sortable="true">
<af:inputText label="Quantity in Bags" id="it14"
partialTriggers="it19" autoSubmit="true"
readOnly="#{row.activeYN == 'N' or row.availability < 0 or row.availability ==0}"
valueChangeListener="#{viewScope.GrowerOrderBean.compare}">
<af:validateLongRange id="RangeCheck_Val1" minimum="1"
maximum="#{row.availability * row.conversion}"
messageDetailNotInRange="You have entered a quantity more than is available. Quantity entered must be in the range of {2} to {3}"
messageDetailMinimum="Minimum {0} allowed is {2}"
messageDetailMaximum="Maximum {0} allowed is {2}"
hintNotInRange="#{'Quantity In Bags to Order'}"/>
<af:validateRegExp pattern="^[1-9]+[0-9]*$"
messageDetailNoMatch="Quantity In Bags must be in whole number format."/>
<f:validator validatorId="custom.conversionValidator"/>
</af:inputText>
</af:column>
<!-- END of column created by SYSTIME -->
<af:column sortProperty="quantity" filterable="true"
sortable="true" headerText="Quantity" id="c3"
width="60"
rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
filterFeatures="caseInsensitive" visible="false">
<div align="center" >
<af:inputText value="#{row.bindings.quantity.inputValue}"
label="#{bindings.queryProductResponseType.hints.quantity.label}"
required="#{bindings.queryProductResponseType.hints.quantity.mandatory}"
columns="#{bindings.queryProductResponseType.hints.quantity.displayWidth}"
maximumLength="#{bindings.queryProductResponseType.hints.quantity.precision}"
shortDesc="#{bindings.queryProductResponseType.hints.quantity.tooltip}"
id="it5" partialTriggers="it19"
readOnly="#{row.activeYN == 'N' or row.availability < 0 or row.availability ==0}">
<f:validator binding="#{row.bindings.quantity.validator}"/>
<af:validateLongRange id="RangeCheck_Val" minimum="1"
maximum="#{row.bindings.availability.inputValue}"
messageDetailNotInRange="You have entered a quantity more than is available. Quantity entered must be in the range of {2} to {3}"
messageDetailMinimum="Minimum {0} allowed is {2}"
messageDetailMaximum="Maximum {0} allowed is {2}"
hintNotInRange="#{'Quantity to Order'}"/>
<af:validateRegExp pattern="^[1-9]+[0-9]*$"
messageDetailNoMatch="Quantity must be in whole number format."/>
</af:inputText>
</div>
</af:column>
<af:column sortProperty="brand" filterable="true" sortable="true"
headerText="Brand" id="c10" width="80"
rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
filterFeatures="caseInsensitive" displayIndex="-1">
<af:inputText value="#{row.bindings.brand.inputValue}"
label="#{bindings.queryProductResponseType.hints.brand.label}"
required="#{bindings.queryProductResponseType.hints.brand.mandatory}"
columns="#{bindings.queryProductResponseType.hints.brand.displayWidth}"
maximumLength="#{bindings.queryProductResponseType.hints.brand.precision}"
shortDesc="#{bindings.queryProductResponseType.hints.brand.tooltip}"
id="it7" readOnly="true">
<f:validator binding="#{row.bindings.brand.validator}"/>
</af:inputText>
</af:column>
<af:column sortProperty="seedsz" filterable="true" sortable="true"
headerText="Seed Size" id="c7" width="50"
rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
filterFeatures="caseInsensitive">
<af:inputText value="#{row.bindings.seedsz.inputValue}"
label="#{bindings.queryProductResponseType.hints.seedsz.label}"
required="#{bindings.queryProductResponseType.hints.seedsz.mandatory}"
columns="#{bindings.queryProductResponseType.hints.seedsz.displayWidth}"
maximumLength="#{bindings.queryProductResponseType.hints.seedsz.precision}"
shortDesc="#{bindings.queryProductResponseType.hints.seedsz.tooltip}"
id="it11" readOnly="true"
contentStyle="text-transform:uppercase">
<f:validator binding="#{row.bindings.seedsz.validator}"/>
</af:inputText>
</af:column>
<af:column sortProperty="pckSize" filterable="true"
sortable="true" headerText="Pkg Size" id="c11"
width="50"
rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
filterFeatures="caseInsensitive"
inlineStyle="#{row.conversion > 1 ? 'background-color:Yellow;' : 'background-color:White;'}">
<af:inputText value="#{row.bindings.pckSize.inputValue}"
label="#{bindings.queryProductResponseType.hints.pckSize.label}"
required="#{bindings.queryProductResponseType.hints.pckSize.mandatory}"
columns="#{bindings.queryProductResponseType.hints.pckSize.displayWidth}"
maximumLength="#{bindings.queryProductResponseType.hints.pckSize.precision}"
shortDesc="#{bindings.queryProductResponseType.hints.pckSize.tooltip}"
id="it8" readOnly="true">
<f:validator binding="#{row.bindings.pckSize.validator}"/>
</af:inputText>
</af:column>
<af:column sortProperty="conversion" filterable="true"
sortable="true" headerText="Conv" id="c4" width="50"
rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
filterFeatures="caseInsensitive" displayIndex="-1">
<af:inputText value="#{row.bindings.conversion.inputValue}"
label="#{bindings.queryProductResponseType.hints.conversion.label}"
required="#{bindings.queryProductResponseType.hints.conversion.mandatory}"
columns="#{bindings.queryProductResponseType.hints.conversion.displayWidth}"
maximumLength="#{bindings.queryProductResponseType.hints.conversion.precision}"
shortDesc="#{bindings.queryProductResponseType.hints.conversion.tooltip}"
id="conversion_it" readOnly="true">
<f:validator binding="#{row.bindings.conversion.validator}"/>
</af:inputText>
</af:column>
<af:column sortProperty="treatment" filterable="true"
sortable="true" headerText="Treatment" id="c13"
width="70"
rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
filterFeatures="caseInsensitive">
<af:inputText value="#{row.bindings.treatment.inputValue}"
label="#{bindings.queryProductResponseType.hints.treatment.label}"
required="#{bindings.queryProductResponseType.hints.treatment.mandatory}"
columns="#{bindings.queryProductResponseType.hints.treatment.displayWidth}"
maximumLength="#{bindings.queryProductResponseType.hints.treatment.precision}"
shortDesc="#{bindings.queryProductResponseType.hints.treatment.tooltip}"
id="it20" readOnly="true">
<f:validator binding="#{row.bindings.treatment.validator}"/>
</af:inputText>
</af:column>
<af:column sortProperty="availability" filterable="true"
sortable="true" headerText="Availability" id="c15"
width="60"
rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
filterFeatures="caseInsensitive">
<af:inputText value="#{row.availability> 500 ? '>=500': (row.availability> 100 and row.availability<500 ? '100-500' : row.availability) }"
label="#{bindings.queryProductResponseType.hints.availability.label}"
required="#{bindings.queryProductResponseType.hints.availability.mandatory}"
columns="#{bindings.queryProductResponseType.hints.availability.displayWidth}"
maximumLength="#{bindings.queryProductResponseType.hints.availability.precision}"
shortDesc="#{bindings.queryProductResponseType.hints.availability.tooltip}"
id="it9" readOnly="true">
<f:validator binding="#{row.bindings.availability.validator}"/>
</af:inputText>
</af:column>
<af:column sortProperty="desiredDeliveryDate" filterable="true"
sortable="true" headerText="Desired Delivery Month" id="c2"
rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
filterFeatures="caseInsensitive" width="90">
<af:selectOneChoice id="soc1" partialTriggers="it19"
unselectedLabel="#{viewScope.GrowerOrderBean.desiredDeliveryDate}"
value="#{row.bindings.desiredDeliveryDate.inputValue}"
readOnly="#{row.activeYN == 'N'}">
<af:forEach var="item"
items="#{viewScope.GrowerOrderBean.selectItems}">
<af:selectItem label="#{item.label}" value="#{item.value}"/>
</af:forEach>
</af:selectOneChoice>
</af:column>
<af:column sortProperty="maturity" filterable="true"
sortable="true" headerText="Maturity" id="c5"
width="60"
rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
filterFeatures="caseInsensitive">
<div align="center">
<af:inputText value="#{row.bindings.maturity.inputValue}"
label="#{bindings.queryProductResponseType.hints.maturity.label}"
required="#{bindings.queryProductResponseType.hints.maturity.mandatory}"
columns="#{bindings.queryProductResponseType.hints.maturity.displayWidth}"
maximumLength="#{bindings.queryProductResponseType.hints.maturity.precision}"
shortDesc="#{bindings.queryProductResponseType.hints.maturity.tooltip}"
id="it16" readOnly="true">
<f:validator binding="#{row.bindings.maturity.validator}"/>
</af:inputText>
</div>
</af:column>
<af:column sortProperty="technology" filterable="true"
sortable="true" headerText="Technology" id="c14"
rendered="true" filterFeatures="caseInsensitive">
<af:inputText value="#{row.bindings.technology.inputValue}"
label="#{bindings.queryProductResponseType.hints.technology.label}"
required="#{bindings.queryProductResponseType.hints.technology.mandatory}"
columns="#{bindings.queryProductResponseType.hints.technology.displayWidth}"
maximumLength="#{bindings.queryProductResponseType.hints.technology.precision}"
shortDesc="#{bindings.queryProductResponseType.hints.technology.tooltip}"
id="it15" readOnly="true">
<f:validator binding="#{row.bindings.technology.validator}"/>
</af:inputText>
</af:column>
<af:column sortProperty="prdLine" filterable="true"
sortable="true" headerText="Product Line" id="c6"
width="70"
rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
filterFeatures="caseInsensitive">
<af:inputText value="#{row.bindings.prdLine.inputValue}"
label="#{bindings.queryProductResponseType.hints.prdLine.label}"
required="#{bindings.queryProductResponseType.hints.prdLine.mandatory}"
columns="#{bindings.queryProductResponseType.hints.prdLine.displayWidth}"
maximumLength="#{bindings.queryProductResponseType.hints.prdLine.precision}"
shortDesc="#{bindings.queryProductResponseType.hints.prdLine.tooltip}"
id="it12" readOnly="true">
<f:validator binding="#{row.bindings.prdLine.validator}"/>
</af:inputText>
</af:column>
<af:column sortProperty="brandMktName" filterable="true"
sortable="true" headerText="Marketing Brand" id="c8"
rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
filterFeatures="caseInsensitive" width="80">
<af:inputText value="#{row.bindings.brandMktName.inputValue}"
label="#{bindings.queryProductResponseType.hints.brandMktName.label}"
required="#{bindings.queryProductResponseType.hints.brandMktName.mandatory}"
columns="#{bindings.queryProductResponseType.hints.brandMktName.displayWidth}"
maximumLength="#{bindings.queryProductResponseType.hints.brandMktName.precision}"
shortDesc="#{bindings.queryProductResponseType.hints.brandMktName.tooltip}"
id="it17" readOnly="true">
<f:validator binding="#{row.bindings.brandMktName.validator}"/>
</af:inputText>
</af:column>
<af:column sortProperty="itemID" filterable="true" sortable="true"
headerText="Item#" id="c1"
rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
filterFeatures="caseInsensitive" width="60">
<af:inputText value="#{row.bindings.itemID.inputValue}"
label="#{bindings.queryProductResponseType.hints.itemID.label}"
required="#{bindings.queryProductResponseType.hints.itemID.mandatory}"
columns="#{bindings.queryProductResponseType.hints.itemID.displayWidth}"
maximumLength="#{bindings.queryProductResponseType.hints.itemID.precision}"
shortDesc="#{bindings.queryProductResponseType.hints.itemID.tooltip}"
id="it6" readOnly="true">
<f:validator binding="#{row.bindings.itemID.validator}"/>
</af:inputText>
</af:column>
<af:column sortProperty="descp" filterable="true" sortable="true"
headerText="Description" id="c17" width="105"
rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
filterFeatures="caseInsensitive">
<af:inputText value="#{row.bindings.descp.inputValue}"
label="#{bindings.queryProductResponseType.hints.descp.label}"
required="#{bindings.queryProductResponseType.hints.descp.mandatory}"
columns="#{bindings.queryProductResponseType.hints.descp.displayWidth}"
maximumLength="#{bindings.queryProductResponseType.hints.descp.precision}"
shortDesc="#{bindings.queryProductResponseType.hints.descp.tooltip}"
id="it10" readOnly="true">
<f:validator binding="#{row.bindings.descp.validator}"/>
</af:inputText>
</af:column>
<af:column sortProperty="primaryUOM" filterable="true"
sortable="true"
headerText="#{bindings.queryProductResponseType.hints.primaryUOM.label}"
id="c16" rendered="false"
filterFeatures="caseInsensitive">
<af:inputText value="#{row.bindings.primaryUOM.inputValue}"
label="#{bindings.queryProductResponseType.hints.primaryUOM.label}"
required="#{bindings.queryProductResponseType.hints.primaryUOM.mandatory}"
columns="#{bindings.queryProductResponseType.hints.primaryUOM.displayWidth}"
maximumLength="#{bindings.queryProductResponseType.hints.primaryUOM.precision}"
shortDesc="#{bindings.queryProductResponseType.hints.primaryUOM.tooltip}"
id="it18">
<f:validator binding="#{row.bindings.primaryUOM.validator}"/>
</af:inputText>
</af:column>
<af:column sortProperty="secondaryUOM" filterable="true"
sortable="true"
headerText="#{bindings.queryProductResponseType.hints.secondaryUOM.label}"
id="c12" rendered="false"
filterFeatures="caseInsensitive">
<af:inputText value="#{row.bindings.secondaryUOM.inputValue}"
label="#{bindings.queryProductResponseType.hints.secondaryUOM.label}"
required="#{bindings.queryProductResponseType.hints.secondaryUOM.mandatory}"
columns="#{bindings.queryProductResponseType.hints.secondaryUOM.displayWidth}"
maximumLength="#{bindings.queryProductResponseType.hints.secondaryUOM.precision}"
shortDesc="#{bindings.queryProductResponseType.hints.secondaryUOM.tooltip}"
id="it21">
<f:validator binding="#{row.bindings.secondaryUOM.validator}"/>
</af:inputText>
</af:column>
</af:table>
<af:spacer width="10" height="5" id="s7"/>
<af:toolbar id="t1">
<af:commandButton id="AddToOrderButton2"
actionListener="#{viewScope.GrowerOrderBean.addToOrder_action}"
partialSubmit="true"
styleClass="addToOrderButton">
<af:clientListener method="setFocus" type="action"/>
</af:commandButton>
</af:toolbar>
<f:facet name="context">
<af:group id="g1">
<af:spacer width="60" height="10" id="s1"/>
<af:commandButton id="cb4"
actionListener="#{viewScope.GrowerOrderBean.addToOrder_action}"
partialSubmit="true"
styleClass="addToOrderButton">
<af:clientListener method="setFocus" type="action"/>
</af:commandButton>
</af:group>
</f:facet>
<f:facet name="info"/>
<f:facet name="legend"/>
<f:facet name="menuBar"/>
<f:facet name="toolbar"/>
</af:panelHeader>
</jsp:root>
Please reply !!
Thanks. -
Query to get the hierarchical results
Hi,
Please help me in writing a Query to get the hierarchical results. I want a result like follows...
course-----groupname---TotalMembers---NotStarted---INProgress---Completed
Course1---country1--------12---------------6----------3-------------3
Course1-----state11-------12---------------6----------3-------------3
Course1------District111--10---------------5----------0-------------0
Course1--------City1111----0---------------0----------0-------------0
Course1--------City1112----1---------------0----------0-------------1
Course1--------City1113----6---------------3----------2-------------1
Course1---country2--------12---------------6----------3-------------3
Course1----state21--------12---------------6----------3-------------3
Course1------District211--10---------------5----------0-------------0
Course1--------City2111----0---------------0----------0-------------0
Course1--------City2112----1---------------0----------0-------------1
Course1--------City2113----6---------------3----------2-------------1
Course2---country1--------12---------------6----------2-------------3
Course2----state11--------12---------------6----------2-------------3
Course2------District111--10---------------5----------0-------------0
Course2--------City1111----0---------------0----------0-------------0
Course2--------City1112----1---------------0----------0-------------1
Course2--------City1113----6---------------3----------1-------------2
Course2---country2--------12---------------6----------3-------------3
Course2-----state21-------12---------------6----------3-------------3
Course2------District211--10---------------5----------0-------------0
Course2--------City2111----0---------------0----------0-------------0
Course2--------City2112----1---------------0----------0-------------1
Course2--------City2113----6---------------3----------2-------------1
These are the Tables available to me.
(I have just given some examle data in tables, to get the idea)
"Groups" Table (This table gives the information of the group)
GROUPID-----NAME-------PARENTID
1---------Universe--------1
2---------country1--------1
3---------state11---------2
4---------District111-----3
5---------City1111--------4
6---------City1112--------4
7---------City1113--------4
8---------country2--------1
9---------state21---------8
10--------District211-----9
11--------City2111--------10
12--------City2112--------10
13--------City2113--------10
"Users" Table (This table provides the user information)
userID----FIRSTNAME---LASTNAME
user1-----------Jim-------Carry
user2-----------Tom-------lee
user3-----------sunny-----boo
user4-----------mary------mall
"User-Group" Tables (This table provides the relation between the groups
and the members)
GROUPID---userID
3-------------user1
3-------------user2
3-------------user4
4-------------user5
5-------------user6
5-------------user7
user_score (This table provides the user scores of different courses)
USERID----course-----STATUS
user1------course1-----complete
user1------course2-----NotStarted
user2------course1-----NotStarted
user2------course2-----complete
user3------course1-----complete
user3------course2-----InProgress
user4------course2-----complete
user4------course1-----NotStarted
I will explain the first four lines of the above result.
Course1---country1--------12---------------6----------4-------------2
Course1-----state11-------12---------------6----------4-------------2
Course1------District111--10---------------5----------3-------------2
Course1--------City1111----0---------------0----------0-------------0
Course1--------City1112----1---------------0----------0-------------1
Course1--------City1113----6---------------3----------2-------------1
# "city1111" group has 0 members
# "city1112" group has 1 member (1 member completed the course1)
# "city1113" group has 6 members(3 members notStarted,2 members
InProgress,1 member completed the course1)
# "District111" is the parent group of above three groups, and has 3
members.(2 members NotStarted,1 member InProgress the course1). But this
group has child groups, so the scores of this group has to rollup the
child groups scores also. Thats why it has 2+3+0+0=6 members Not
Started,1+2+0+0=3 members InProgress,0+0+1+1=2 members completed.
# "state11" group also same as the above group.
I am able to get the group hierarchy by using "Connect By" like follows
"select name,groupid,parentid from groups_info start with groupid=1 connect by parentid = prior groupid;"
But i want to get the result as i have mentioned in the begining of this discussion.
I am using oracle 8i (oracle8.1.7).
Thank you for any help
Srinivas MThis may not be exactly what you want,
but it should be fairly close:
SET LINESIZE 100
SET PAGESIZE 24
COLUMN groupname FORMAT A20
SELECT INITCAP (user_score.course) "course",
groupnames.name "groupname",
COUNT (*) "TotalMembers",
SUM (NVL (DECODE (UPPER (user_score.status), 'NOTSTARTED', 1), 0)) "NotStarted",
SUM (NVL (DECODE (UPPER (user_score.status), 'INPROGRESS', 1), 0)) "InProgress",
SUM (NVL (DECODE (UPPER (user_score.status), 'COMPLETE', 1), 0)) "Completed"
FROM user_score,
user_group,
(SELECT ROWNUM rn,
name,
groupid
FROM (SELECT LPAD (' ', 2 * LEVEL - 2) || name AS name,
groupid
FROM groups
START WITH groupid = 1
CONNECT BY PRIOR groupid = parentid)) groupnames
WHERE user_score.userid = user_group.userid
AND user_group.groupid IN
(SELECT groupid
FROM groups
START WITH groupid = groupnames.groupid
CONNECT BY PRIOR groupid = parentid)
GROUP BY user_score.course, groupnames.name, groupnames.rn
ORDER BY user_score.course, groupnames.rn
I entered the minimal test data that you
provided and a bit more and got this result
(It was formatted as you requested,
but I don't know if it will display properly
on this post, or wrap around):
course groupname TotalMembers NotStarted InProgress Completed
Course1 Universe 6 2 0 4
Course1 country1 5 2 0 3
Course1 state11 5 2 0 3
Course1 District111 2 0 0 2
Course1 City1112 1 0 0 1
Course1 City1113 1 0 0 1
Course1 country2 1 0 0 1
Course1 state21 1 0 0 1
Course1 District211 1 0 0 1
Course1 City2113 1 0 0 1
Course2 Universe 5 1 1 3
Course2 country1 4 1 1 2
Course2 state11 4 1 1 2
Course2 District111 1 0 1 0
Course2 City1113 1 0 1 0
Course2 country2 1 0 0 1
Course2 state21 1 0 0 1
Course2 District211 1 0 0 1
Course2 City2113 1 0 0 1
Here is the test data that I used, in case
anyone else wants to play with it:
create table groups
(groupid number,
name varchar2(15),
parentid number)
insert into groups
values (1,'Universe',null)
insert into groups
values (2,'country1',1)
insert into groups
values (3,'state11',2)
insert into groups
values (4,'District111',3)
insert into groups
values (5,'City1111',4)
insert into groups
values (6,'City1112',4)
insert into groups
values (7,'City1113',4)
insert into groups
values (8,'country2',1)
insert into groups
values (9,'state21',8)
insert into groups
values (10,'District211',9)
insert into groups
values (11,'City2111',10)
insert into groups
values (12,'City2112',10)
insert into groups
values (13,'City2113',10)
create table user_group
(groupid number,
userid varchar2(5))
insert into user_group
values (3,'user1')
insert into user_group
values (3,'user2')
insert into user_group
values (3,'user4')
insert into user_group
values (4,'user5')
insert into user_group
values (5,'user6')
insert into user_group
values (5,'user7')
insert into user_group
values (7,'user8')
insert into user_group
values (13,'user9')
insert into user_group
values (11,'use11')
insert into user_group
values (6,'use6')
create table user_score
(userid varchar2(5),
course varchar2(7),
status varchar2(10))
insert into user_score
values ('use6','course1','complete')
insert into user_score
values ('user9','course1','complete')
insert into user_score
values ('user9','course2','complete')
insert into user_score
values ('user8','course1','complete')
insert into user_score
values ('user8','course2','InProgress')
insert into user_score
values ('user1','course1','complete')
insert into user_score
values ('user1','course2','NotStarted')
insert into user_score
values ('user2','course1','NotStarted')
insert into user_score
values ('user2','course2','complete')
insert into user_score
values ('user3','course1','complete')
insert into user_score
values ('user3','course2','InProgress')
insert into user_score
values ('user4','course2','complete')
insert into user_score
values ('user4','course1','NotStarted') -
Query to get the customer's ship_to Phone# and Fax#
Gurus -
Can anyone of you please help me in getting a query to shows the phoen and fax# of the Customer's ship_to Phone# and fax#
customers--> on Address tab ( click open) On next screen click on contacts tabe for SHIP_TO row , there under the communications section, there are telephone and fax details , i want to get those details.
Please help me in getting the query to get the fax and phone#.
Infact I am using the below query and still having issues getting the correct fax# ( using teh same logic for phone#)
select DISTINCT DECODE(PHONE_AREA_CODE,NULL,'',PHONE_AREA_CODE||'-')||PHONE_NUMBER
FROM hz_cust_accounts_all hca,
hz_parties hzp1,
hz_cust_acct_sites_all hcas,
hz_cust_site_uses_all hcsu,
hz_relationships hzr,
hz_org_contacts hoc,
hz_contact_points hcp,
hz_parties hzp,
hz_cust_accounts_all hca1,
hr_locations hrl
WHERE 1 = 1
AND hca.party_id = hzr.object_id
AND hzr.relationship_id = hoc.party_relationship_id
AND hoc.party_site_id = hcas.party_site_id
AND hcas.cust_acct_site_id = hcsu.cust_acct_site_id
AND hzr.party_id = hcp.owner_table_id
--AND hcp.primary_flag = 'Y'
AND hzr.subject_id = hzp.party_id
AND hzp.party_id = hca1.party_id(+)
AND hzp1.party_id(+) = hca.party_id
AND hcsu.location = hrl.location_id(+)
and hcsu.site_use_id = hsu.site_use_id
AND hcp.OWNER_TABLE_NAME IN ('HZ_PARTIES')
AND hcp.CONTACT_POINT_TYPE IN ('PHONE')
AND hcp.PHONE_LINE_TYPE = 'FAX'
AND hcp.STATUS = 'A'
and nvl (hcsu.status, 'x') = 'A'
AND hcsu.SITE_USE_CODE = 'SHIP_TO'
--and hcsu.site_use_id = hsu.site_use_id
-- and hcsu.cust_acct_site_id = hsu.cust_acct_site_id
--and hca1.cust_account_id = hca.cust_account_idWhat is the responsibility name? Form name and navigation path?
You can determine the query from the form itself as follows:
- Query the record(s)
- Click on Help > Diagnostics > Examine
- Under 'Block' field, select 'SYSTEM'
- Under 'Field' field, select 'LAST_QUERY'
You may also review the following note:
Note: 259722.1 - HOWTO Determine Table and Column Name from a field in a form in 11i
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=259722.1 -
Spatial Query to get the coodinates only
Hi,
I define an attribute called "geometry" in TILE table.
For normal query (to get the tileId), I do the following (an example for illustration):
SELECT tileId FROM tile
WHERE SDO_RELATE(geometry, MDSYS.SDO_GEOMETRY(2003, 8307, NULL,
MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 1),
MDSYS.SDO_ORDINATE_ARRAY(50,10, 70,10, 70,50, 50,50, 50,10)), 'mask=COVERS+CONTAINS+OVERLAPBDYINTERSECT+EQUAL querytype=WINDOW') = 'TRUE'
ORDER BY tileid;
If I do a query on geometry, I will get something like (select geometry from tile):
SDO_GEOMETRY(2003, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(60, 60, 80, 60, 80, 80, 60, 80, 60, 60))
How can I just get the result of (60, 60, 80, 60, 80, 80, 60, 80, 60, 60) ?
Thanks for your advice!
Message was edited by:
eecowThis should get you the results you need.
select tileid, gv.x, gv.y from tile, table(sdo_util.getvertices(geom)) gv where sdo_relate etc etc etc
Cheers,
David -
Query to get the windows-user(os)
Hallo,
I have a windows operating system and on this system is oracle database with the
spatial-option installed. Now I wanna create a trigger which writes in a table if
a geometry is updated. In this table I wanna write the new geometry, the time of
the update and the windows-user that logged on the windows operating system. I
don't wanna know the database user.
What is the sql-query to get the windows-user?
Thanks KatrinAs an alternative, use the SYS_CONTEXT function to get some of this info.
oracle@fuzzy:~> sqlplus test/test@XE
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 2 16:32:53 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> select sys_context('USERENV', 'HOST') Host,
2 sys_context('USERENV', 'IP_ADDRESS') IP,
3 sys_context('USERENV', 'OS_USER') OS_User,
4 sys_context('USERENV', 'AUTHENTICATED_IDENTITY') Identity
5 from dual;
HOST IP OS_USER IDENTITY
fuzzy 127.0.0.2 oracle test
SQL> More info at http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/functions165.htm#i1038176 -
Query to get the Excise amount and basic amount based on the cst or vat tax
Dear all,
I need a right query to get the basic amount ,excise amount and the tax amount based on the CST or VAT tax rate.The output should be like this,
VAT
goods excisabe at 1% - taxable amt(basic+excise for vat 1%) tax amt
goods excisable at 4%- txable amt tax amt
CST
goods excisabe at 1% - taxable amt(basic+excise for CST 1%) tax amt
My problem will also be solved..if i am able to get the basic value from base table OPCH itself............Since am using the PCH1 table to get the total basic amt...the values are duplicating.
Regards,
ShyamHi Sowjanya,
If you're simply trying to place a grand total, use the 'Insert Summary' option.
Choose the measure field as the 'Field to Summarize' > Choose 'Sum' as the summary operation > Under 'Summary Location' choose 'Grand Total Report Footer'.
-Abhilash -
Query to get the Discoverer privileges granted to user / responsibility
Hello,
I am discussing the oracle applications EUL here.
I am interested to know the privileges granted to a user / responsibility from backend or any option with "eulapi" utility which can be used to list the same.
Which EUL table should I query to get the privileges granted to a user / responsinility?
Thanks,
AjayHi Ajay,
Which EUL table should I query to get the privileges granted to a user / responsinility?Go through this link you wil get what your looking for.
Re: List of Users in Admin layer under Privileges
Hope this helps you.
Best Wishes,
Kranthi. -
Hello
I would like to know the query to get the complete user profile, for example the user password, all the privileges it has, etc
Thank youGo to tahiti.oracle.com
Drill down to your selected product and version
There, find the complete documentation set
There, find the find Reference Manual
There, find a complete description of all the data dictionary view.
Browse through the names of those view for something that looks like a likely candidate (thing with "user" or "priv" in the name)
Edited by: EdStevens on Oct 23, 2009 8:20 PM
Maybe you are looking for
-
How to make VM button call Voicemail (not Visual Voicemail) - T-Mobile
I have an iPhone 5 on T-Mobile, and the VM button takes me to non-functional visual voicemail. My wife has iPhone 5 too, also on T-Mobile, but her voicemail button calls her voicemail. How can I make my phone do that? (Because Visual Voicemail doesn'
-
Agent Commission Settings required
Hi Every One, Each Customer is having more than one Broker and also they are giving the Commission to the Brokers. Brokerage rate is fixed and is divided among the brokers. How to configure this in SAP and how to settle the payment to the Broker? Not
-
WLS 8.1 cluster startup scripts
Hi all, I'm new to WebLogic and so am stumped by a configuration issue that should be normally be simple. I'm running WebLogic Server 8.1 SP6 on a Linux server and the Sun 1.4.2 JVM. A single cluster with 3 managed servers is set up, all servers bein
-
I have an applet class in my webserver directory. How do i call it within a servlet .What should be the values for code and codebase properties. Kindly send me an example code if possible. Bye for now Thanx in advance Naveen
-
IS-Banking / Reference Interest Rates
Hi, We are having a problem when creating a condition group - time deposit settlement (T-code F9COGR2). We first defined a reference interest rate (for credit interest time deposit). We then changed the interest rate and when we run the settlement,