Issue with query to find the lag data
Hello PL/SQL Gurus/Experts,
I am not able to extract the data with the following table structure -
drop table T2;
create table T2(Stream, Trade, Fees) as select
'MECHNICAL', 'Primary', '5534500' from dual union all select
'ELECTRICAL', 'Secondary', '5285500' from DUAL union all select
'MECHNICAL', 'Secondary', '2364535' from dual union all select
'ELECTRICAL', 'Primary', '1734540' from DUAL union all select
'MBE', 'Secondary', '3424500' from dual union all select
'ELECTRONICS', 'Primary', '5004567' from DUAL union all select
'ELECTRONICS', 'Secondary', '4543200' from DUAL union all select
'COMPUTERS', 'Secondary', '5534500' from DUAL union all select
'CIVIL', 'Primary', '2345500' from DUAL union all select
'CIVIL', 'Secondary', '4456500' from DUAL union all select
'COMPUTERS', 'Primary', '9542500' from DUAL;I want to extract the data in following format -
Stream Trade Fees
MECHNICAL Primary 5534500
Secondary 2364535
ELECTRICAL Primary 1734540
Secondary 5285500
ELECTRONICS Primary 5004567
Secondary 4543200
CIVIL Primary 2345500
Secondary 4456500
MBE Primary
Secondary 3424500
Total 34693342Now if if i am using the following query -
SELECT CASE WHEN LAG(Stream||Trade) OVER (ORDER BY Stream, Trade, Fees) = Stream||Trade THEN NULL ELSE Stream END Stream
, CASE WHEN LAG(Stream||Trade) OVER (ORDER BY Stream, Trade, Fees) = Stream||Trade THEN NULL ELSE Trade END Trade
, CASE WHEN LAG(Fees) OVER (partition by Stream||Trade ORDER BY Stream, Trade, Fees) = Fees THEN NULL ELSE Fees END Fees
FROM ( select distinct Stream, Trade, Fees from T2 ORDER BY Stream, Trade, Fees);
SELECT NVL2(LAG(Trade) OVER (PARTITION BY Stream, Trade ORDER BY Stream, Trade, Fees),Null,Trade) Trade,
NVL2(LAG(Stream) OVER (PARTITION BY Stream, Trade ORDER BY Stream, Trade, Fees),Null,Stream) Stream,
Fees
from (select distinct Stream, Trade, Fees from T2)Kindly help me ...
Thank you all for your time and effort in advance.
This way!!!
select a.stream2 stream, trade, sum(fees)
from (
select case row_number() over(partition by stream order by trade)
when 1 then stream
else 'Unknown' end stream2,trade, fees
from t2
order by stream, trade
) a
where a.stream2 != 'Unknown'
group by a.stream2, trade;
STREAM TRADE SUM(FEES)
ELECTRICAL Primary 1734540
MECHNICAL Primary 5534500
COMPUTERS Primary 9542500
MBE Primary
ELECTRONICS Primary 5004567
CIVIL Primary 2345500PS:- Use instead of {CODE}
Also, use != instead of <> while pasting the code on Forum. <> is converted to NULL or probably ignored.
Similar Messages
-
Sql query to find the scheduled date
I schedule a job for last Thursday of every month. Based on my current date and time I need the date of my next scheduled run of the job...
(i.e) If today is 28-march-2012 (Wednesday) my query should return 3/29/12(which is the last thursday of the month)
If today is 30-march-2012 (Friday) my query should return 4/26/12 (which is the last thursday of next month)
If today is 29-march-2012 and time is 11:00 AM and i have scheduled a job to run at 12:00 PM of last thursday of every month then my query should return 3/29/12
If today is 29-march-2012 and time is 1:00 PM then my query should return 4/26/12924163 wrote:
I schedule a job for last Thursday of every month. Based on my current date and time I need the date of my next scheduled run of the job...
(i.e) If today is 28-march-2012 (Wednesday) my query should return 3/29/12(which is the last thursday of the month)
If today is 30-march-2012 (Friday) my query should return 4/26/12 (which is the last thursday of next month)
If today is 29-march-2012 and time is 11:00 AM and i have scheduled a job to run at 12:00 PM of last thursday of every month then my query should return 3/29/12
If today is 29-march-2012 and time is 1:00 PM then my query should return 4/26/12may be
SQL> ed
Wrote file afiedt.buf
1 with tmp as
2 (
3 select to_date('28-march-2012','DD-month-YYYY') dt from dual union all
4 select to_date('29-march-2012 11:00:00 AM','DD-month-YYYY HH:MI:SS AM') dt from dual union all
5 select to_date('29-march-2012 1:00:00 PM','DD-month-YYYY HH:MI:SS AM') dt from dual union all
6 select to_date('29-march-2012 12:00:00 PM','DD-month-YYYY HH:MI:SS AM') dt from dual union all
7 select to_date('29-march-2012 11:59:00 AM','DD-month-YYYY HH:MI:SS AM') dt from dual union all
8 select to_date('30-march,2012','DD-month-YYYY') dt from dual
9 )
10 select dt,
11 case
12 when Next_day(Add_months(Trunc(dt, 'MM'), 1) - 7, 'thursday') + ( 12 /
13 24 ) >
14 dt then Next_day(Add_months(Trunc(dt, 'MM'), 1) - 7, 'thursday')
15 else Next_day(Add_months(Trunc(dt, 'MM'), 2) - 7, 'thursday')
16 end new_dat
17 from tmp
18* order by dt
SQL> /
DT NEW_DAT
28-Mar-2012 12:00:00 AM 29-Mar-2012 12:00:00 AM
29-Mar-2012 11:00:00 AM 29-Mar-2012 12:00:00 AM
29-Mar-2012 11:59:00 AM 29-Mar-2012 12:00:00 AM
29-Mar-2012 12:00:00 PM 26-Apr-2012 12:00:00 AM
29-Mar-2012 01:00:00 PM 26-Apr-2012 12:00:00 AM
30-Mar-2012 12:00:00 AM 26-Apr-2012 12:00:00 AM
6 rows selected.
SQL> -
Issue in Query to find the Cumulative Values
Hi All,
I am developing one Query in which i have to show plant wise last 12 months status of audit.
In this audit i am able to show the types of audits say X,Y,Z perfectly.
But the thiing i want to calculate is the cumulative values of X,Y,Z before the last 12 months.
For Ex: Audit X Y Z Formula(X+Y-Z)
month1 10 20 30 0
month2 10 30 10 30
month12 20 40 20 40
month13 ***(X) ***(Y) ***(Z)..till
Like this i want to develop the report as per the requirement.
Please help how to resolve this issue.
Thanks in Advance.Hi All,
I am developing one Query in which i have to show plant wise last 12 months status of audit.
In this audit i am able to show the types of audits say X,Y,Z perfectly.
But the thiing i want to calculate is the cumulative values of X,Y,Z before the last 12 months.
For Ex: Audit X Y Z Formula(X+Y-Z)
month1 10 20 30 0
month2 10 30 10 30
month12 20 40 20 40
month13 ***(X) ***(Y) ***(Z)..till
Like this i want to develop the report as per the requirement.
Please help how to resolve this issue.
Thanks in Advance. -
Looking for a query to find first/last dates in overlapping dates...
Hi,
I'm looking for a query to find the first dates and last dates in a table conaining overlapping dates.
I have a subscription table which has for each Customer start and end date for different subscriptions.
I want to know the different ranges of date where there is subscriptions active.
so if the table has this:
CustID, Start date, end date
1, 2008-01-01, 2012-06-06
1 ,2009-01-01, 2011-01-01
1, 2011-01-01, 2013-02-02
1, 2013-01-01, 2013-08-08
1, 2014-01-01, 2014-04-04
I want to produce this result:
custid, range start, range end
1, 2008-01-01, 2013-08-08
1, 2014-01-01, 2014-04-04
the first row is the range identified from the 4 rows in my subscription table.
thanks :)I think I found it...
http://stackoverflow.com/questions/5213484/eliminate-and-reduce-overlapping-date-ranges
let me try this method
Hi,
m writing to follow up with you on this post. Thanks for you posting a reply to share your workground. Was the problem resolved after performing the above link? If you are satisfied with the above solution, I’d like to mark this issue as "Answered".
Please also feel free to unmark the issue, with any new findings or concerns you may have.
Thanks,
Sofiya Li
If you have any feedback on our support, please click here.
Sofiya Li
TechNet Community Support -
Query to find the latest record with respect to the current status
Dear gurus
I have the following data in a table
Customernum
bkcode
reqtdate
Prevstat
currstat
The data will be like this
CustomerNum bkcode reqdate prevstat currstat
5900 1 03-Aug-12 0 1
5900 1 06-Aug-12 1 0
5900 5 22-Jun-12 0 1
If a customer has an issue to solved, a record is added with bkcode , register date and currstat will be 1
If the issue is resolved for the bookingcode,a new record is added, the currentstatus will become 0. and prev stat will show 1. Row no 1 and 2 reflects this case
If this table is queried for finding the unresolved issues. the output should be only the Last row of the above example. since issue with bookingcode 1 has been resolved
I have trying hard to get this thing confused what to use Lead or Max
Kindly guide meHi,
one way here:
WITH mytable(CustomerNum, bkcode, reqdate, prevstat, currstat)
AS
SELECT 5900, 1, TO_DATE('03-Aug-12', 'DD-Mon-YY'), 0, 1 FROM DUAL UNION ALL
SELECT 5900, 1, TO_DATE('06-Aug-12', 'DD-Mon-YY'), 1, 0 FROM DUAL UNION ALL
SELECT 5900, 5, TO_DATE('22-Jun-12', 'DD-Mon-YY'), 0, 1 FROM DUAL
SELECT CustomerNum, bkcode, reqdate, prevstat, currstat
FROM (SELECT a.*
, ROW_NUMBER() OVER (PARTITION BY CustomerNum, bkcode
ORDER BY reqdate DESC) AS rn
FROM mytable a
WHERE rn=1
AND currstat=1;
CUSTOMERNUM BKCODE REQDATE PREVSTAT CURRSTAT
5900 5 22-JUN-12 0 1Regards.
Al
Edited by: Alberto Faenza on Dec 18, 2012 5:23 PM
Changed again!! Previous logic was wrong -
Query to find the second maximum date in a table
please give me the query to find the second maximum date in a table
You can try with this
SELECT empno
,hiredate
FROM emp a
WHERE 2 = (SELECT COUNT(DISTINCT hiredate)
FROM emp b
WHERE b.hiredate >= a.hiredate
OR
SELECT empno
,hiredate
FROM (SELECT ROWNUM row_num
,empno
,hiredate
FROM emp a
ORDER BY hiredate ASC
WHERE row_num = 2;Regards
Arun -
My Mac can't find the volume " Data" on Time Capsule, Also I can't find with the disk-utility program the hard disk in the Time Capusule.
So I can't format the disk in the Time Capsule
Deconnevt and then connecting the power tp the Time Capsule gives also no solution.
What can I do?
JoeI listed the commands.. that is how you manually mount the disk.. follow exactly the commands I gave you.
In finder use top menu, go, connect to server.
Type in the following.
AFP://TCname or AFP://TCIpaddress (obviously you replace with the actual name or the actual IP address).
If that fails..
try
SMB://TCname
Here is the screenshot.
tardis4 being the name of my TC.
It should then ask you for your credentials.
And it should remember them in the keychain and be able to then get TM to connect. -
Query to find the request group associated with a responsibility
Hi All,
I have to attach a report to around 30 responsibilities. For this I will have to find the request group for each responsibility and then add the Concurrent Program for the report in the corresponding request group.
Can anyone help me with a query to find the request group associated with a responsibility.
Regards,
SKJust to add to the query above, if you want to see request group along with request_group_id you do join as follows
SELECT frv.responsibility_name
,frg.request_group_name
FROM fnd_request_groups frg,
fnd_request_group_units frgu,
fnd_responsibility_vl frv
WHERE 1 = 1
AND frgu.request_group_id = frg.request_group_id
AND frv.request_group_id = frg.request_group_id
ORDER BY responsibility_name
Thanks
Shailendra -
Migration from PC with MA did not end. Had to shut down MacBookPro. After restart no new user was created. Can't find the transferred data (35 GB). Would like to delete it.
iTunes is required to initially activate the phone. Back when the iPhone 3G was sold, you would take it out of the box and see a "Connect to iTunes" screen. She HAD to connect to a computer in order to begin using the phone. Does she remember what computer this was?
-
Function to find the Last Date of Month One Year Ago - RETURNS ERROR
I've written sql code which takes a date and finds the Last Day of the Month one year ago. For example, it takes the date '2015-04-17' and returns the date '2014-04-30'. The code works fine in a query. Now I'm trying to turn this into a function. However,
when I try to create the function I get the error:
Operand type clash: date is incompatible with int
Why is this error being returned?
Here is my function:
CREATE FUNCTION dbo.zEOM_LY_D(@Input Date)
RETURNS date
AS
BEGIN;
DECLARE @Result date;
SET @Result = convert(DATE, DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,dateadd(m, -11, @Input)+1),0)),101)
RETURN @Result;
END;
Thanks for any help you can give.
Stan,
Thanks very much- that does the trick. I should have said I am using SQL 2008 so EOMONTH is not available to me. I still don't get why I got an error though, since I was treating a date like a date and not like an int.
Thanks, John
I think i found the issue but i do not know why it is causing the issue. i think may be the way dates are treated/stored internally..i think dates are stored as no of days after 0001/01/01 but cannot see how this cwould effect..may be somebody else can through
some light.....
if you make it as datetime it will work,
if you leave it as date - eliminate adding 1... you should prefer to use dateadd to add/substract dates.
try this to understand..
--removed the +1 in the code
declare @input date
set @input ='20150503'
select
convert(DATE, DATEADD(s,-1,DATEADD(mm,DATEDIFF(m,0,dateadd(m, -11, @Input)),0)),101)
go
--made the datatype as datetime
declare @input datetime
set @input ='20150503'
select
convert(DATE, DATEADD(s,-1,DATEADD(mm,DATEDIFF(m,0,dateadd(m, -11, @Input)+1),0)),101)
Hope it Helps!! -
How to use Add Query Criteria for the MySQL data Base in Netbeans ?
How to use Add Query Criteria for the MySQL data Base in Netbeans Visual web pack.
When the Query Criteria is add like
SELECT ALL counselors.counselors_id, counselors.first_name, counselors.telephone,counselors.email
FROM counselors WHERE counselors.counselors_id = ?
when i run this Query in the Query Window
i get a error message Box saying
Query Processing Error Parameter metadata not available for the given statement
if i run the Query with out Query Criteria its working fine.*I am glad I am not the only one who have this problem. Part of issue has been described as above, there are something more in my case.
Whenever I try to call ****_tabRowSet.setObject(1, userDropList.getSeleted()); I got error message as shown below:*
The Java codes are:
public void dropDown1_processValueChange(ValueChangeEvent event) {
Object s = this.dropDown1.getSelected();
try {
this.User_tabDataProvider1.setCursorRow(this.User_tabDataProvider1.findFirst("User_Tab.User_ID", s));
this.getSessionBean1().getTrip_tabRowSet1().setObject(1, s);
this.Trip_tabDataProvider1.refresh();
} catch (Exception e) {
this.log("Error: ", e);
this.error("Error: Cannot select user"+e.getMessage());
SQL statement for Trip_tabRowSet:
SELECT ALL Trip_Tab.Trip_Date,
Trip_Tab.User_ID,
Trip_Tab.Destination
FROM Trip_Tab
WHERE Trip_Tab.User_ID = ?
Error messages are shown below:
phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@5abf3f) threw exception: com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: No value specified for parameter 1 java.sql.SQLException: No value specified for parameter 1
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:559)
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:435)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:274)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
tandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.sql.SQLException: No value specified for parameter 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1674)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1622)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1332)
at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:193)
at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:979)
at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:1439)
at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1274)
at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:335)
at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:306)
at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:639)
at com.sun.webui.jsf.component.TableRowGroup.getRowKeys(TableRowGroup.java:1236)
at com.sun.webui.jsf.component.TableRowGroup.getFilteredRowKeys(TableRowGroup.java:820)
at com.sun.webui.jsf.component.TableRowGroup.getRowCount(TableRowGroup.java:1179)
at com.sun.webui.jsf.component.Table.getRowCount(Table.java:831)
at com.sun.webui.jsf.renderkit.html.TableRenderer.renderTitle(TableRenderer.java:420)
at com.sun.webui.jsf.renderkit.html.TableRenderer.encodeBegin(TableRenderer.java:143)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:810)
at com.sun.webui.jsf.component.Table.encodeBegin(Table.java:1280)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:881)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
Also when I tried to update my MYSQL connector / J driver to version 5.1.5 from 5.0.5 (NB 5.5.1) and 5.0.7 (NB 6.1), I could not get it work (looooong time to search some JDBC classes and with no response in the end) on both of my Netbean 5.5.1(on PC) and Netbean 6.1(on laptop) IDEs.
Could anybody look into this issue.
Many thanks
Edited by: linqing on Nov 22, 2007 4:48 AM -
Need to know the sqluery to find the disabled date from OIM 9.1.0.1
Hi Experts,
Need very urgent inputs from you all for the preparation of our audit.
We are using OIM9.1.0.1
We need to know the sqlquery for finding the Disabled date in OIM given the user ids, as currently we are unable to get the exact data from Historical Reports Option in OIM.
I need to give in this format:
select usr_login, usr_disabled from schemaname.tablename where usr_login in
('aaa','bbb'..... etc)
We have three attributes :USR_DISABLED_BY_PARENT,USR_DISABLED,USR_DEPROVISIONING_DATE,but none of them give the exact date,
USR_DISABLED gives just a flag as 1 or 0.
Also there are no other fields in the corresponding usr table.
So how to fetch the exact Disabled date from OIM system when I input the user ids.
Your immediate response is appreciated.
Thanks
SSIn the entire thread many experts have given nice queries in different formats...
The best approach would be to open up the SQL Developer, connect with the OIM Database and experiment with all sorts of SQL queries provided by all the experts..
Learn some SQL techniques, like Inner Join etc...
Then you yourself will be able to figure out what you need, in exactly which format, for which users and for whom you have to restrict
Then not only this question, you would be able to solve dozens of similar such issues yourself...
And trust me, nothing can match that...
Just in case, you are not familiar with SQL Developer,
http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
Oracle SQL Developer 3.2.1 (3.2.10.09.57)
September 24, 2012
The Disabled DATE will be the creation date of that entry in the UPA_FIELDS table when Users.Status changed to Disabled.
SELECT USR.USR_LOGIN, UPA_FIELDS.CREATE_DATE
FROM UPA_FIELDS
WHERE UPA_FIELDS.FIELD_NAME='Users.Status'
AND UPA_FIELDS.FIELD_NEW_VALUE='Disabled'
AND UPA_FIELDS.UPA_USR_KEY=USR.USR_KEY
AND USR.USR_LOGIN NOT IN ('XELSYSADM', 'XELOPERATOR', 'WEBLOGIC'); -
Query to find the list of BP without having Particular GL transactions.
Hi Experts,
I want the query to find the List of Business partner who is not having Journal entry for Certain General ledger.
Scenario: we are creating JE for TDS posting.
so, i want to know the list of BP , who and all not having particular TDS GL for the particular period.
Thanks in advance,
DwarakHi Dwarak,
Sure, no problem
DECLARE @AcctCode AS NVARCHAR(100)
SELECT @AcctCode=T0.AcctCode FROM OACT T0 WHERE T0.AcctCode='[%0]'
DECLARE @DateFrom AS DATETIME
SELECT @DateFrom=T1.RefDate FROM JDT1 T1 WHERE T1.RefDate=[%1]
DECLARE @DateTo AS DATETIME
SELECT @DateTo=T2.RefDate FROM JDT1 T2 WHERE T2.RefDate=[%2]
SELECT CardCode FROM OCRD WHERE CardType='S'
AND CardCode NOT IN(
SELECT DISTINCT ContraAct FROM JDT1
WHERE Account=@AcctCode AND RefDate BETWEEN @DateFrom AND @DateTo)
Ok, now, here's the problem that I just encountered. This query will work, but, no matter how we fill the parameter, it will show you the very same result. To be honest, I don't know what's wrong with this query.
If you change all the variables ( @AcctCode and @DateFrom and @DateTo ) directly, it will give you the accurate result. Take this as an example:
SELECT CardCode FROM OCRD WHERE CardType='S'
AND CardCode NOT IN(
SELECT DISTINCT ContraAct FROM JDT1
WHERE Account='10030201' AND RefDate BETWEEN '2011-09-01' AND '2011-09-20')
I hard-code the account code, date from and date to for selection. System will show you the accurate result, but using parameter as in first query, system show same result no matter how we fill the parameter.
Sorry, it seems that I could only partially solved your problem here. I already tried to create a stored procedure and executing the stored procedure with parameter, but still, somehow SBO show very same result no matter if we change the parameter.
So, my solution need user to manually change the parameter in query. I know, this is a stupid solution, I'm afraid I can't help you to achieve perfect solution here. Maybe anyone here in the forum could guide me to fix my mistake in first query and how to rectify it?
Best Regards,
Hendry Wijaya -
Issue with displaying summary in the Page Bottom
Hi Friends,
I have an issue with displaying summary in the page bottom. for this i am using command BOTTOM and ENDBOTTOM in Main Window.
I designed 2 pages are First and Next, in the first it displays PO Header details and Item details in the Main window and also Item details continuious in the Next Page also.
If the lines are enough in Bottom then it displays the summary. But if the lines are not enough in bottom then it does not trigger the new page, so that it doesn't displays the Summary in Bottom.
for ex: Total lines of the page 50 and Bottom required 15 lines. In the next page contains upto 35 lines, it triggers the Bottom.
But if the lines are more than 35 and below than 50, it does not trigger the new page so that it does not shows the bottom.
Please help me on the same, this is very urgent.I will give a rewatrd if it is helful.
Regards,
SubbaraoHI,
Try with printing the bottom data with Protect and ENDPROTECT along with your Bottom and endbottom.
Eg: Protect
bottom
text
endbottom
endprotect.
Regards,
Venkatesh -
Is it possible to find the creation date of a contact in icloud?
I would like to find the creation date of a contact in icloud, I don't know if it's possible ? many thanks
I don't think you're going to be able to do this. The problem is that the data on an audio CD is in a special format (caslled Solomon-Reed Cross Interleave if you really want to know) in which eveything is in a single stream with special error protection, and a table of contents at the beginning listing where each track begins. When you put the CD into a Mac the Finder shows the tracks as AIFF files, but this is an illusion; since the Finder is doing this on the fly it shows them as created at the time of insertion (I don't know why you're getting 'yesterday'). If you drag them to the Desktop then they will be converted to AIFF in the process.
I don't know what a PC does: but the CD's data isn't a computer-type file and doesn't contain the creation date, so it's academic.
Maybe you are looking for
-
C7280 Printer no longer sees my network
I was printing just fine from my C7280 printer this morning - but as of this afternoon the printer no longer see's my router. When I go to Network and do the Wireless Setup Wizard it will see routers in neighboring apartments, and even my iPhone, bu
-
I'm new to flash and need help with some controls
I'm builidng a site that has a portfiolio of work to display. When the visitor arrives at the portfolio page he (or she) is faced with a split panel. The right panel displays a summary of a client and the work. The left panel displays the work exampl
-
Can't get to the installation window for Panther 10.3 upgrade
Hello all, thanks for reading, Here's the deal: I have an iMac, 500 Mhz, G3, 128 RAM that originally has Mac OS 9 built into it. Recently (a day or two ago), I wanted to format my computer because it was giving me too much trouble (a message saying t
-
Time issue in WL9.2 and JDK1.5
I am using WL9.2 and JDK which comes along with WL9.2. I could deploy my application successfully. But I am facing an issue with time. The time with WL9.2 application is around 15 minutes faster. For eg. if I have a dislpay of time say 10.00 is WL8.1
-
Got new iPod, deleted iTunes, lost music
My friend recently got a new iPod (and turned the old one in for a discount). My friend's new iPod would not sync with old iTunes, so she tried to upgrade it. For some reason it wouldn't. In frustration, she deleted iTunes from Add/Remove Programs in