Unable to implement JUErrorHandler
I'm trying to make my application show the simple error dialog every time jbo raise exception, not the error dialog of class JUErrorHandlerDlg.
I had already implemented JUErrorHandler and overrided method reportException() but it's still not work.
My code:
public class FormCurrenciesView extends JFrame implements JUErrorHandler
public static void main(String [] args)
try
JUApplication app = JUMetaObjectManager.createApplicationObject(...);
JUPanelBinding panelBinding = new JUPanelBinding(...);
app.getApplicationModule().fetchAttributeProperties(...);
panelBinding.setApplication(app);
FormCurrenciesView1 frame = new FormCurrenciesView(panelBinding);
JUMetaObjectManager.setBaseErrorHandler(frame);
catch(Exception ex)
JUMetaObjectManager.reportException(null, ex);
System.exit(1);
public void reportException(JUFormBinding formBnd, Exception ex){
JOptionPane.showMessageDialog(null, ex.getMessage(), "Error", JOptionPane.INFORMATION_MESSAGE);
Pls help me to solve this problem.
Thanks.
Sorry, I mean the JOptionPane.ShowMessageDlg() function doesn't show error dialog as it's supposed to do. The error handler, instead, print its error stacktrace in Jdev's debug window.
One more thing, I has tested my application with some changes:
I write a new class name MyJUErrorPane which is also implemented JUErrorHandler and overrided method reportException, my code right now is:
1: JUMetaObjectManager.setBaseErrorHandler(new MyJUErrorHandler());
2: JUApplication app = JUMetaObjectManager.createApplicationObject(...);
3: JUPanelBinding panelBinding = new JUPanelBinding(...);
4: app.getApplicationModule().fetchAttributeProperties(...);
5: panelBinding.setApplication(app);
6: FormCurrenciesView frame = new FormCurrenciesView(panelBinding);
The above code worked perfectly, class MyJUErrorHandler show the error mess correctly. But when I moved the top line to the bottom (moved line 1 to line 7)... nothing show but the stacktrace on debug window.
Have you got any idea ???
Thank you for your reply.
Similar Messages
-
Unable to implement WOOgnl parser in my WO application on WO5.4.
Eclipse Version: Juno Service Release 1
java version: 1.6.0_18
WebObject Version = 5.4.3
Steps I am using to implement WOOgnl Parser:-
1- I have imported WOOgnl.framework in build path
2- I have made following changes to build.properties file
ognl.active = true
ognl.helperFunctions=true
ognl.inlineBindings=true
ognl.parseStandardTags=true
The whole build.properties looks like this:-
#Wed Nov 21 13:06:11 EST 2012
classes.dir=bin
component.inlineBindingPrefix=[
component.inlineBindingSuffix=]
component.wellFormedTemplateRequired=true
customInfoPListContent=
eoAdaptorClassName=
embed.Local=false
embed.Project=false
embed.System=false
ognl.active = true
ognl.helperFunctions=true
ognl.inlineBindings=true
ognl.parseStandardTags=true
principalClass=Application
project.name=Empsoft
project.name.lowercase=empsoft
project.type=application
webXML=false
webXML_CustomContent=
When I am using the above steps i am getting error mentioned below:-
A fatal exception occurred: ognl/PropertyAccessor
java.lang.NoClassDefFoundError: ognl/PropertyAccessor
When I am not importing WOOgnl.framework in my build path the project is running fine but I have to remove all the duplicate entries in Wod file else exception is thrown when I am opening the page from UI.
Please let me know where I am going wrong.
Thanks!!!!
Regards
Mritunjay KumarThe ognl properties (ognl.active, ognl.helperFunctions, etc) go in the Properties file in the Resources folder, not in build.properties.
You should rarely have to edit the build.properties file manually. It is edited from eclipse by right clicking on project name and selecting "Properties" from the contextual menu and then editing the settings in WOLips Deployment and WOLips Development. If you are using WOOgnl for inline bindings rather than Apple's inline bindings mechanism then in WOLips Development you should probably change
component.inlineBindingPrefix=[
component.inlineBindingSuffix=]
to
component.inlineBindingPrefix=$
component.inlineBindingSuffix=
so that WOLips validation knows what style inline bindings you are using.
Also I don't understand why you have duplicate entries in wod file. -
CA / NDES Virtual Directory Structure Missing in IIS 7 unable to implement SSL for ADMIN sites
We've recently finiallized both an Enterprice 2008 R2 CA and NDES service installtion configuration. All services are running, to include web enrollment for both. CA sits on a DC, as required, and the NDES roll sits on a standalone machine.
All service generated certificates / templates are in place and or issued including SSL certificates for service web front ends.
I'm trying to take the next step in hardening both of the web front ends by requiring SSL web validation and client SSL authentication.
Problem: When examining the site structures, CA and NDES, within the IIS7 configuration manager the following inconsistancies are present:
Enterprise CA:
o No virtual directory is configured or listed under the Certsrv or Enrollment sub-sites, however as previously stated all servies are up and operational.
2. NDES:
o IIS7 configuration manager doesn't list any Certsrv sub-site, but once again all services are up and runniing. I can process SCEP requests via the web.
The following 2 items are listed under the default site on the NDES service machine: Rpc and RpcWithCert
In past experience I would expect those items to be associated with Exchange, but since NDES is new to me they may be standard.
Not to state the obvious but all Sys32 files and folders are correct as both services are running properly. Can anyone tell me if I've missed some critical article on AD CS or IIS7 that tells me why these 2 conditions are present.
Since the Certsrv sub-site exists on the CA I would assume a normal SSL bind will work, but with critical items missing from within IIS7 (at least from my view) i don't want to compound the problem.. Since there is no Certsrv
structure on the NDES machines I'm not sure what the best way to proceed is. Any help would be greatly appreicated.
V/R BECA / NDES all function properly. I'm still reseaching proper IIS 7 SSL implementation, when the virtual directory and sub-site structer is either missing or imcomplete when viewed from within the IIS7 manager.
These services where put into production without a thurough configuration check prior to implementation, so I don't have a test environment setup at the moment to just start playing. I'm thinking this weekend I'm going to have to VSS the current
machines and throw them on the Dev network and see how badly I can break them.
V/R BE -
Unable to implement Constructor Overloading in an inherited class. Plz Help
Please do compile the program in in order to notice the error.
class EmpDet
int id,age;
String name;
String gender;
EmpDet(int id1,String name1,int age1,String gender1)
this.id = id1;
this.name= name1;
this.age= age1;
this.gender = gender1;
void Id_Name()
System.out.println("EmpId : "+id+" and Name : "+name);
void Gender_Age()
System.out.println("Employee is a "+gender+" and is "+age+" years old.");
class Employee extends EmpDet
String locality;
Employee(int a,String b,int c,String d)
super(a,b,c,d);
Employee(String locality1)// Constructor overloading. My problem.
this.locality = locality1;
void locality()
System.out.println("The employee resides at "+locality);
void DiplayStmt()
System.out.println("DISPLAYING EMPLOYEE DETAILS..");
System.out.println("******************************");
public static void main (String[] args)
Employee det = new Employee(010,"John",32,"M");
Employee addr = new Employee("Tambaram");
addr.DiplayStmt();
det.Id_Name();
det.Gender_Age();
addr.locality();
}Hey Thanks.. I guess what you said makes sense.
I was fiding it hard to agree that there needs to be a match between the Constructors of the Base Class and the Sub Class. I altered the program by adding a constructor in the Base class and using the super(0 function in the Sub class and that seems to work..
class EmpDet
int id,age;
String name;
String gender;
EmpDet(int id1,String name1,int age1,String gender1)
this.id = id1;
this.name= name1;
this.age= age1;
this.gender = gender1;
EmpDet(String addr)
System.out.println("Address is implemented in SubClass");
void Id_Name()
System.out.println("EmpId : "+id+" and Name : "+name);
void Gender_Age()
System.out.println("Employee is a "+gender+" and is "+age+" years old.");
class Employee extends EmpDet
String locality;
Employee(int a,String b,int c,String d)
super(a,b,c,d);
Employee(String locality1) // Constructor Overloading
super(locality1);
this.locality = locality1;
void locality()
System.out.println("The employee resides at "+locality);
void DiplayStmt()
System.out.println("DISPLAYING EMPLOYEE DETAILS..");
System.out.println("******************************");
public static void main (String[] args)
Employee det = new Employee(010,"John",32,"M");
Employee addr = new Employee("Tambaram");
addr.DiplayStmt();
det.Id_Name();
det.Gender_Age();
addr.locality();
Message was edited by:
3402102 -
Unable to implement Forall in a procedure
Hi,
I have been unsuccessful in inserting data into a target table with resultset from a multiple tables as below.
I'm using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit
I'm not sure if the below implementation is possible, Please advice on the error that I'm getting as below
Compilation errors for PROCEDURE PDR.PROC_COMPOSITE_DATA_LOAD
Compilation errors for PROCEDURE PDR.PROC_COMPOSITE_DATA_LOAD
Error: PL/SQL: ORA-00947: not enough values
Line: 37
Text: ) VALUES v1_pershing_staging(i);
Error: PL/SQL: SQL Statement ignored
Line: 29
Text: INSERT INTO PRD_DET_MON_LD(
create or replace procedure PROC_COMPOSITE_DATA_LOAD is
cursor CUR_pershing_staging is
select PRD_MST.PRD_ID,
PRD_MST.Feed_Cur_Id,
prd_stg.effective_date,
'10000' as SRC_id,
prd_stg.accts,
prd_stg.return_type,
prd_stg.mon_return
from PRD_PERSHING_STAGING_LOAD PRD_STG, lv_mst, PRD_MST
where PRD_STG.src ='PERSHING'
and PRD_STG.Src_Provided_Id = lv_mst.geo_manager_code
and lv_mst.lv_id = PRD_MST.lv_id
and prd_mst.end_date > sysdate
and lv_mst.end_date > sysdate;
TYPE t_pershing_staging IS TABLE OF CUR_pershing_staging%ROWTYPE
INDEX by PLS_INTEGER;
v1_pershing_staging t_pershing_staging;
BEGIN
OPEN CUR_pershing_staging;
LOOP
FETCH CUR_pershing_staging BULK COLLECT INTO v1_pershing_staging LIMIT 1000;
FORALL i IN 1..v1_pershing_staging.COUNT
INSERT INTO PRD_DET_MON_LD(
PRD_ID,
CUR_ID,
EFFECTIVE_DATE,
SRC_ID,
UNIT_VALUE,
RETURN_TYPE,
RETURN_VALUE
) VALUES v1_pershing_staging(i);
EXIT WHEN v1_pershing_staging%NOTFOUND;
END LOOP;
CLOSE CUR_pershing_staging;
COMMIT;
END PROC_COMPOSITE_DATA_LOAD;Thanks!
Edited by: Harinath Arasu on Aug 10, 2011 11:51 PMTest data
SQL> select * from v$version where rownum < 2
2 /
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
SQL> create table emp
2 (
3 eno integer,
4 ename varchar2(10)
5 )
6 /
Table created.
SQL> create table emp_target
2 (
3 eno integer,
4 ename varchar2(10)
5 )
6 /
Table created.
SQL> insert into emp
2 select level, 'A'||level
3 from dual
4 connect by level <= 1000
5 /
1000 rows created.
SQL> commit
2 /
Commit complete.In the version of oracle you are in referring a record type in FORALL is restricted.
Here is an example
SQL> declare
2 cursor c is select * from emp;
3 type tbl is table of c%rowtype index by pls_integer;
4 emp_tbl tbl;
5 begin
6 open c;
7 loop
8 fetch c bulk collect into emp_tbl limit 100;
9 exit when c%notfound;
10
11 forall i in 1..emp_tbl.count
12 insert into emp_target ( eno, ename )
13 values (emp_tbl(i).eno, emp_tbl(i).ename);
14 end loop;
15 end;
16 /
values (emp_tbl(i).eno, emp_tbl(i).ename);
ERROR at line 13:
ORA-06550: line 13, column 12:
PLS-00436: implementation restriction: cannot reference fields of BULK In-BIND
table of records
ORA-06550: line 13, column 12:
PLS-00382: expression is of wrong type
ORA-06550: line 13, column 28:
PLS-00436: implementation restriction: cannot reference fields of BULK In-BIND
table of records
ORA-06550: line 13, column 28:
PLS-00382: expression is of wrong type
ORA-06550: line 13, column 12:
PL/SQL: ORA-22806: not an object or REF
ORA-06550: line 12, column 4:
PL/SQL: SQL Statement ignoredSo you need to do it like this. Declare individual Table Type for each column of the cursor and use it.
SQL> declare
2 cursor c is select * from emp;
3 type eno_tbl is table of emp.eno%type index by pls_integer;
4 type ename_tbl is table of emp.ename%type index by pls_integer;
5 leno eno_tbl;
6 lename ename_tbl;
7 begin
8 open c;
9 loop
10 fetch c bulk collect into leno, lename limit 100;
11 exit when c%notfound;
12
13 forall i in 1..leno.count
14 insert into emp_target ( eno, ename )
15 values (leno(i), lename(i));
16 end loop;
17 end;
18 /
PL/SQL procedure successfully completed.
SQL> select count(*) from emp_target
2 /
COUNT(*)
1000 -
Unable to implement ratio control
I have previously posted a doubt regarding how to store previous values of the variables in labview but have not recieved any replies.
Hopefully this time I will get some hints or rather solution.
I have three control parameters A, B and C (they denote some percentage values) and their corresponding inidicators. For the first time, the user will give two inputs. So the third one will be automatically calculated from the sum of the two inputs and subtracting it from hundred. From the next time onwards, when the user changes one input, the other two will get modified. I am facing problem in this auto-tuning part. In the attached code I have designed the initialization step in 0th stage of the stack sequence and the auto tuning part in the 1st stage.
Now as the three controls are inter-dependable, I want to take three
ratios i.e A/B. B/C and C/A. As the total unit is 100, So, for varying B
we will get a modifed A = 100-B-C i.e 100-B(1+C/B). Simililarly for
varying A, we will get a modified C= 100-A(1+B/A) and for varying C, we
get a modifed B= 100 - C(1+A/C). In the auto-tuning part, I am first adding all the parameters and is
equating with 100. The boolean output activates the true or false loop.
If the case is true then whatever comes in the control gets displayed in
the corresponding indicator. If the case is false, whatever comes in
the control is displayed in the indicator along with modifying the value
of the other one variable. Here only I am facing the problem. I am not
able to connect the input control with the indicator.
It will of great help if you give me some solutions or hints regarding this problem. I am attaching the code, which is not yet complete, to present a rough overview.
Thanks in advance.
Solved!
Go to Solution.
Attachments:
test3.vi 42 KBI no longer have LabVIEW 6.1, but here's a simple implementation in LabVIEW 8.2 and a corresponding image.
Note that there is only one event case and that the code is scalable. It can easily be adapted to more than 3 controls by just expanding the array and some minor code changes (e.g. instead of division by 2, divide by "array size - 1").
Maybe you can adapt it to LabVIEW 6.1...
LabVIEW Champion . Do more with less code and in less time .
Attachments:
MakeSum100BD.gif 27 KB
MakeSum100FP.png 17 KB
test3_MOD.vi 26 KB -
Unable to implement Programmatic ADF Faces Tree component in jdev 11g
I have referred to the posts " [Back to programming: Programmatic ADF Faces Tree component|http://one-size-doesnt-fit-all.blogspot.com/2007/05/back-to-programming-programmatic-adf.html] " and " [Follow-up: Programmatic ADF Faces Tree in JDev 11g|http://one-size-doesnt-fit-all.blogspot.com/2007/05/follow-up-programmatic-adf-faces-tree.html] ",
The first post showed how to construct the elements in the tree programmatically rather than relying on bindings (in JDeveloper 10.1.3)
and the second post tells the only difference in 11g .
I am trying to implement the elements of the tree programatically in Jdev 11g(specifically 11.1.1.0.2) but no result is coming .
There is no compilation/run time error , its just that the tree is not visible.
Can anyone suggest any key points which should be focussed during this implementation?Hi,
follow the description
http://www.oracle.com/technology/products/adf/adffaces/11/doc/demo/adf_faces_rc_demo.html
to install the ADF Faces RC component demo in JDeveloper. It has a tree example. Have a look at their implementation and dapt it to your needs
Frank -
Can someone please examine these lines of code and help me to resolve error? Thank You, Markus
Warning 1
The field 'RectangleApplication.TableTop.cost' is never used
Warning
2
'RectangleApplication.TableTop.Display()' hides inherited member 'RectangleApplication.Rectangle.Display()'. Use the new keyword if hiding was intended.
namespace RectangleApplication
class Rectangle
//member variables
protected double length;
protected double width;
public Rectangle(double l, double w)
length = l;
width = w;
public double GetArea() ///Function Call
return length * width;
public void Display()
Console.WriteLine("Length: {0}", length);
Console.WriteLine("Width: {0}", width);
Console.WriteLine("Area: {0}", GetArea());
//end class Rectangle
class Table {
private double cost; //error code
public TableTop(double l, double w) : base(l,w)
public double GetCost()
double cost;
cost = GetArea() * 70; //this tells me ToString call GetArea method??
return cost;
public void Display() //error code
base.Display();
Console.WriteLine("Cost {0}", GetCost());
class ExecuteRectangle
static void Main(string[] args)
TableTop t = new TableTop (4.5, 7.5); //this asks for the TableTop method???
t.Display();
Console.ReadLine();
Andrew ColemanTo solve the first issue, remove the line:
private double cost;
To solve the second issue, add virtual to the first Display:
public virtual void Display()
then add override to the second Display:
public override void Display() -
Unable to implement OCI8 driver (missing oci804.dll)
Hi,
I am at a total loss how to get my servlet to communicate with a
jdbc/oci8 driver.
I installed Oracle8i server, client + programmer. Configured
Net8, the database, and even ODBC.. but still i can't get the
example found in the
orahome\jdbc\demo\samples\oci8\basic-~1\Employee to run properly.
I have all classpaths set correctly (c:\jdk1.1.6\lib\classes.zip
+ c:\jdbc\lib\classes111.zip) + my path references to
c:\oracle8\orahome\bin) -> oci804jdbc.dll
when i Run 'Employee.java' by executing :
java -classpath
c:\jdbc\lib\classes111.zip;c:\jdk1.1.6\lib\classes.zip Employee
it gives my an error saying i miss DLL ORA804.DLL
i've looked through documentation and as far as i can see the
Oracle Installer should have installed it on my system, but i
can't find it anywhere (not on my PC, not on the Oracle CDROM
Enterprise Edition, not on SUN's website, and not even on any
ftp/webcrawler) !!
Please help me, if you have it or know how to obtain it please
please please let me know (email me :
[email protected])
i'm using jdk1.1.6 (using jkd12 things wouldn't even compile),
NT4, 128mb, Oracle8i and everything else from oracle
(tools/utils/sql+ etc) work great.
Thanks,
Tamerius Cohen.
nullYou are using a version of the classes111.zip which is linked for
the 8.0.4 OCI driver (which will require the 8.0.4 client files).
Why not use the classes111.zip located in your oracle 8.1
oracle_home\jdbc\lib directory? That one will use the Oracle 8.1
client.
null -
How do i implement this logic in a Single SQL?
Hi Friends!
I’m having some problem. Hope you can share your thoughts with me.
Let’s come to the problem
I’m having following recordset
S_id t_nbr d_id a_dtm b_dtm c_dtm create_tmstmp ind_f
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:48:00 22-Nov-2007 13:43:00 23-Nov-2007 01.01.14.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:58:00 22-Nov-2007 13:43:00 23-Nov-2007 01.03.00.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 14:30:00 22-Nov-2007 14:44:00 23-Nov-2007 01.04.05.000000000 AM U
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 14:31:00 22-Nov-2007 14:45:00 23-Nov-2007 01.04.07.000000000 AM U
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 14:31:00 22-Nov-2007 14:45:00 23-Nov-2007 01.04.22.000000000 AM U
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:29:00 22-Nov-2007 13:43:00 23-Nov-2007 01.05.46.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:29:00 22-Nov-2007 13:43:00 23-Nov-2007 01.06.01.000000000 AM U
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:29:00 22-Nov-2007 13:43:00 23-Nov-2007 01.07.13.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:40:00 22-Nov-2007 13:43:00 23-Nov-2007 01.08.26.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:51:00 22-Nov-2007 13:43:00 23-Nov-2007 01.09.27.000000000 AM U
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 15:01:00 22-Nov-2007 14:43:00 23-Nov-2007 01.10.19.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 15:29:00 22-Nov-2007 15:43:00 23-Nov-2007 01.11.46.000000000 AM U
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 15:29:00 22-Nov-2007 15:43:00 23-Nov-2007 01.12.01.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 15:29:00 22-Nov-2007 15:43:00 23-Nov-2007 01.20.13.000000000 AM LNow,
We have to consider a record as duplicate if the combination of a_dtm||b_dtm||c_dtm are same.
First, we have to select all the unique record. That will be part of our output -
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:48:00 22-Nov-2007 13:43:00 23-Nov-2007 01.01.14.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:58:00 22-Nov-2007 13:43:00 23-Nov-2007 01.03.00.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 14:30:00 22-Nov-2007 14:44:00 23-Nov-2007 01.04.05.000000000 AM U
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:40:00 22-Nov-2007 13:43:00 23-Nov-2007 01.08.26.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:51:00 22-Nov-2007 13:43:00 23-Nov-2007 01.09.27.000000000 AM U
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 15:01:00 22-Nov-2007 14:43:00 23-Nov-2007 01.10.19.000000000 AM LSecond, we have to deals with the duplicate record.
That means the duplicate record set will be as follows -
set 1:
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 14:31:00 22-Nov-2007 14:45:00 23-Nov-2007 01.04.07.000000000 AM U
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 14:31:00 22-Nov-2007 14:45:00 23-Nov-2007 01.04.22.000000000 AM U
set 2:
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:29:00 22-Nov-2007 13:43:00 23-Nov-2007 01.05.46.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:29:00 22-Nov-2007 13:43:00 23-Nov-2007 01.06.01.000000000 AM U
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:29:00 22-Nov-2007 13:43:00 23-Nov-2007 01.07.13.000000000 AM Lset 3:
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 15:29:00 22-Nov-2007 15:43:00 23-Nov-2007 01.11.46.000000000 AM U
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 15:29:00 22-Nov-2007 15:43:00 23-Nov-2007 01.12.01.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 15:29:00 22-Nov-2007 15:43:00 23-Nov-2007 01.20.13.000000000 AM LSelection of 1 record from each duplicate set:
In case of set 1:
Since there is no 'L' in ind_f column, we will pick the first record from it. So the selected record will be -
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 14:31:00 22-Nov-2007 14:45:00 23-Nov-2007 01.04.07.000000000 AM UIn case of set 2:
Since there is 'L' in ind_f column for the first entry from that duplicate set, we will select the first record as -
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:29:00 22-Nov-2007 13:43:00 23-Nov-2007 01.05.46.000000000 AM LIn case of set 3:
Since there is 'L' in ind_f column, we will start searching from the first record of that duplicate set. We got 'L' in the second record from that set.
Hence we will select the following record -
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 15:29:00 22-Nov-2007 15:43:00 23-Nov-2007 01.12.01.000000000 AM LSo, our final output will be the combination of distinct record and one record that is selected from our duplicate set. Hence the final output will be -
S_id t_nbr d_id a_dtm b_dtm c_dtm create_tmstmp ind_f
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:48:00 22-Nov-2007 13:43:00 23-Nov-2007 01.01.14.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:58:00 22-Nov-2007 13:43:00 23-Nov-2007 01.03.00.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 14:30:00 22-Nov-2007 14:44:00 23-Nov-2007 01.04.05.000000000 AM U
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 14:31:00 22-Nov-2007 14:45:00 23-Nov-2007 01.04.07.000000000 AM U
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:29:00 22-Nov-2007 13:43:00 23-Nov-2007 01.05.46.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:40:00 22-Nov-2007 13:43:00 23-Nov-2007 01.08.26.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 13:51:00 22-Nov-2007 13:43:00 23-Nov-2007 01.09.27.000000000 AM U
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 15:01:00 22-Nov-2007 14:43:00 23-Nov-2007 01.10.19.000000000 AM L
306 1107 YYZ 22-Nov-2007 12:32:00 22-Nov-2007 15:29:00 22-Nov-2007 15:43:00 23-Nov-2007 01.12.01.000000000 AM LI've already identify the duplicate records in a single SQL query. But, unable to implement this selection approach of single record from the duplicate set.
How do i achive this in a single SQL?
By the way,
I'm using Oracle 9i.
Thanks for your efforts in advance.
Regards.
Satyaki De.
Oops! You are right. I've made the change.
N.B.: The duplicate sets will form based on the create_tmstmp fieldHi, Satyaki.
Your query should be very simple:
SQL> with t as
2 (select 306 S_id, 1107 t_nbr, 'YYZ' d_id, to_date('22-Nov-2007 12:32:00','dd-mon-yyyy hh24:mi:ss') a_dtm, to_date('22-Nov-2007 13:48:00','dd-mon-yyyy hh24:mi:ss') b_dtm, to_date('22-Nov-2007 13:43:00','dd-mon-yyyy hh24:mi:ss') c_dtm, to_timestamp('23-Nov-2007 01.01.14.000000000 AM','dd-mon-yyyy hh:mi:ss.ff AM') create_tmstmp, 'L' ind_f from dual union all
3 select 306 S_id, 1107 t_nbr, 'YYZ' d_id, to_date('22-Nov-2007 12:32:00','dd-mon-yyyy hh24:mi:ss') a_dtm, to_date('22-Nov-2007 13:58:00','dd-mon-yyyy hh24:mi:ss') b_dtm, to_date('22-Nov-2007 13:43:00','dd-mon-yyyy hh24:mi:ss') c_dtm, to_timestamp('23-Nov-2007 01.03.00.000000000 AM','dd-mon-yyyy hh:mi:ss.ff AM') create_tmstmp, 'L' ind_f from dual union all
4 select 306 S_id, 1107 t_nbr, 'YYZ' d_id, to_date('22-Nov-2007 12:32:00','dd-mon-yyyy hh24:mi:ss') a_dtm, to_date('22-Nov-2007 14:30:00','dd-mon-yyyy hh24:mi:ss') b_dtm, to_date('22-Nov-2007 14:44:00','dd-mon-yyyy hh24:mi:ss') c_dtm, to_timestamp('23-Nov-2007 01.04.05.000000000 AM','dd-mon-yyyy hh:mi:ss.ff AM') create_tmstmp, 'U' ind_f from dual union all
5 select 306 S_id, 1107 t_nbr, 'YYZ' d_id, to_date('22-Nov-2007 12:32:00','dd-mon-yyyy hh24:mi:ss') a_dtm, to_date('22-Nov-2007 14:31:00','dd-mon-yyyy hh24:mi:ss') b_dtm, to_date('22-Nov-2007 14:45:00','dd-mon-yyyy hh24:mi:ss') c_dtm, to_timestamp('23-Nov-2007 01.04.07.000000000 AM','dd-mon-yyyy hh:mi:ss.ff AM') create_tmstmp, 'U' ind_f from dual union all
6 select 306 S_id, 1107 t_nbr, 'YYZ' d_id, to_date('22-Nov-2007 12:32:00','dd-mon-yyyy hh24:mi:ss') a_dtm, to_date('22-Nov-2007 14:31:00','dd-mon-yyyy hh24:mi:ss') b_dtm, to_date('22-Nov-2007 14:45:00','dd-mon-yyyy hh24:mi:ss') c_dtm, to_timestamp('23-Nov-2007 01.04.22.000000000 AM','dd-mon-yyyy hh:mi:ss.ff AM') create_tmstmp, 'U' ind_f from dual union all
7 select 306 S_id, 1107 t_nbr, 'YYZ' d_id, to_date('22-Nov-2007 12:32:00','dd-mon-yyyy hh24:mi:ss') a_dtm, to_date('22-Nov-2007 13:29:00','dd-mon-yyyy hh24:mi:ss') b_dtm, to_date('22-Nov-2007 13:43:00','dd-mon-yyyy hh24:mi:ss') c_dtm, to_timestamp('23-Nov-2007 01.05.46.000000000 AM','dd-mon-yyyy hh:mi:ss.ff AM') create_tmstmp, 'L' ind_f from dual union all
8 select 306 S_id, 1107 t_nbr, 'YYZ' d_id, to_date('22-Nov-2007 12:32:00','dd-mon-yyyy hh24:mi:ss') a_dtm, to_date('22-Nov-2007 13:29:00','dd-mon-yyyy hh24:mi:ss') b_dtm, to_date('22-Nov-2007 13:43:00','dd-mon-yyyy hh24:mi:ss') c_dtm, to_timestamp('23-Nov-2007 01.06.01.000000000 AM','dd-mon-yyyy hh:mi:ss.ff AM') create_tmstmp, 'U' ind_f from dual union all
9 select 306 S_id, 1107 t_nbr, 'YYZ' d_id, to_date('22-Nov-2007 12:32:00','dd-mon-yyyy hh24:mi:ss') a_dtm, to_date('22-Nov-2007 13:29:00','dd-mon-yyyy hh24:mi:ss') b_dtm, to_date('22-Nov-2007 13:43:00','dd-mon-yyyy hh24:mi:ss') c_dtm, to_timestamp('23-Nov-2007 01.07.13.000000000 AM','dd-mon-yyyy hh:mi:ss.ff AM') create_tmstmp, 'L' ind_f from dual union all
10 select 306 S_id, 1107 t_nbr, 'YYZ' d_id, to_date('22-Nov-2007 12:32:00','dd-mon-yyyy hh24:mi:ss') a_dtm, to_date('22-Nov-2007 13:40:00','dd-mon-yyyy hh24:mi:ss') b_dtm, to_date('22-Nov-2007 13:43:00','dd-mon-yyyy hh24:mi:ss') c_dtm, to_timestamp('23-Nov-2007 01.08.26.000000000 AM','dd-mon-yyyy hh:mi:ss.ff AM') create_tmstmp, 'L' ind_f from dual union all
11 select 306 S_id, 1107 t_nbr, 'YYZ' d_id, to_date('22-Nov-2007 12:32:00','dd-mon-yyyy hh24:mi:ss') a_dtm, to_date('22-Nov-2007 13:51:00','dd-mon-yyyy hh24:mi:ss') b_dtm, to_date('22-Nov-2007 13:43:00','dd-mon-yyyy hh24:mi:ss') c_dtm, to_timestamp('23-Nov-2007 01.09.27.000000000 AM','dd-mon-yyyy hh:mi:ss.ff AM') create_tmstmp, 'U' ind_f from dual union all
12 select 306 S_id, 1107 t_nbr, 'YYZ' d_id, to_date('22-Nov-2007 12:32:00','dd-mon-yyyy hh24:mi:ss') a_dtm, to_date('22-Nov-2007 15:01:00','dd-mon-yyyy hh24:mi:ss') b_dtm, to_date('22-Nov-2007 14:43:00','dd-mon-yyyy hh24:mi:ss') c_dtm, to_timestamp('23-Nov-2007 01.10.19.000000000 AM','dd-mon-yyyy hh:mi:ss.ff AM') create_tmstmp, 'L' ind_f from dual union all
13 select 306 S_id, 1107 t_nbr, 'YYZ' d_id, to_date('22-Nov-2007 12:32:00','dd-mon-yyyy hh24:mi:ss') a_dtm, to_date('22-Nov-2007 15:29:00','dd-mon-yyyy hh24:mi:ss') b_dtm, to_date('22-Nov-2007 15:43:00','dd-mon-yyyy hh24:mi:ss') c_dtm, to_timestamp('23-Nov-2007 01.11.46.000000000 AM','dd-mon-yyyy hh:mi:ss.ff AM') create_tmstmp, 'U' ind_f from dual union all
14 select 306 S_id, 1107 t_nbr, 'YYZ' d_id, to_date('22-Nov-2007 12:32:00','dd-mon-yyyy hh24:mi:ss') a_dtm, to_date('22-Nov-2007 15:29:00','dd-mon-yyyy hh24:mi:ss') b_dtm, to_date('22-Nov-2007 15:43:00','dd-mon-yyyy hh24:mi:ss') c_dtm, to_timestamp('23-Nov-2007 01.12.01.000000000 AM','dd-mon-yyyy hh:mi:ss.ff AM') create_tmstmp, 'L' ind_f from dual union all
15 select 306 S_id, 1107 t_nbr, 'YYZ' d_id, to_date('22-Nov-2007 12:32:00','dd-mon-yyyy hh24:mi:ss') a_dtm, to_date('22-Nov-2007 15:29:00','dd-mon-yyyy hh24:mi:ss') b_dtm, to_date('22-Nov-2007 15:43:00','dd-mon-yyyy hh24:mi:ss') c_dtm, to_timestamp('23-Nov-2007 01.20.13.000000000 AM','dd-mon-yyyy hh:mi:ss.ff AM') create_tmstmp, 'L' ind_f from dual)
16 --
17 select *
18 from (select t.*,
19 row_number() over(partition by s_id, t_nbr, d_id, a_dtm, b_dtm, c_dtm order by nullif(ind_f, 'U') nulls last, create_tmstmp) rn
20 from t)
21 where rn = 1
22 /
S_ID T_NBR D_ID A_DTM B_DTM C_DTM CREATE_TMSTMP IND_F RN
306 1107 YYZ 22.11.2007 22.11.2007 22.11.2007 23-NOV-07 01.05.46.000000000 AM L 1
306 1107 YYZ 22.11.2007 22.11.2007 22.11.2007 23-NOV-07 01.08.26.000000000 AM L 1
306 1107 YYZ 22.11.2007 22.11.2007 22.11.2007 23-NOV-07 01.01.14.000000000 AM L 1
306 1107 YYZ 22.11.2007 22.11.2007 22.11.2007 23-NOV-07 01.09.27.000000000 AM U 1
306 1107 YYZ 22.11.2007 22.11.2007 22.11.2007 23-NOV-07 01.03.00.000000000 AM L 1
306 1107 YYZ 22.11.2007 22.11.2007 22.11.2007 23-NOV-07 01.04.05.000000000 AM U 1
306 1107 YYZ 22.11.2007 22.11.2007 22.11.2007 23-NOV-07 01.04.07.000000000 AM U 1
306 1107 YYZ 22.11.2007 22.11.2007 22.11.2007 23-NOV-07 01.10.19.000000000 AM L 1
306 1107 YYZ 22.11.2007 22.11.2007 22.11.2007 23-NOV-07 01.12.01.000000000 AM L 1
9 rows selected
SQL> \PS BTW you're not a newbie in the forum, please, post WITH clause or CREATE/INSERT statement for your data next time. -
Implementing Web Services as Transport Protocol in B2B and Healthcare
Hi B2B Gurus,
I am unable to implement web service transport in B2B and Healthcare, I am getting few issues.
I fallowed below link.
http://docs.oracle.com/cd/E28280_01/user.1111/e10229/bb_partner_webservice.htm#BABIIEJJ
Can any one explain how exactly web service transport works in B2B?
please provide me any samples or document on implementing web service transport in B2B and Healthcare.
Thanks in advance.
SatheeshI think the B2B forum will be the best place to ask those questions - Integration - B2B
Cheers
John
http://john-goodwin.blogspot.com/ -
Hello frnds,
I am working on a project whose aim is to make an editor completely in java. But i m unable to implement feature like Find.
Please suggest me how to implement this.
Thnxif your editor is a jtextarea, i would suggest something like that:
String textTyped = textarea.getText();
String lookForText = new JOptionPane.showInputDialog("text you look for?");
int indexOfTheText = textTyped.indexOf(lookForText);
textArea.moveCaretPosition(indexOfTheText);maybe the instruction to focus on the caret after the caret move is missing here
just try :) -
Implement a way to transfer from a Spotify account created using Facebook to a Spotify only account
I have noticed an increase in posts recently relating to people who wish to deactivate their Facebook accounts, but if they do so they will also loose access to their Spotify account, since it was created using their Facebook details.
There should be an easy way to change your Spotify account, from a Spotify account which is tied to Facebook, to a Spotify (email only) account without the need to go through the quite long process outlined in my tutorial here.
This relates quite closely to being able to change your username idea, but I think this is different issue!
Please please please implement this!
Peter
Thanks so much to everyone!
At the moment, we're unable to implement the idea suggested above for a few reasons. As a few of you have noticed, our system currently doesn't support the changing of usernames since playlists are tied to usernames. Many folks who created accounts via Facebook before we implemented an email registration option would like the option to "transfer" their account to another.
You can indeed follow the instructions in Peter's aforementioned guide to transfer your account. Moreover, we understand the want for a simpler way to move to an email created an account instead of a Facebook created account. However, we won't implement an option to "transfer" your account at this time.
If you have any questions about how to transfer your account, follow Peter's guide for the quick fix or contact customer support. -
Implement BADI BADI_SD_CM & BADI_SD_SALES in ECC 6.00
Hi ,
I am unable to implement these BADI (BADI_SD_CM & BADI_SD_SALES ) for field VBKD-KZAZU in create sales order.
Please advise us how to create an Implementation in ECC 6.0dear pradeep,
Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE
Go to the Transaction, for which we want to find the BADI,
Get the Program Name of Corresponding Transaction.
(Click on System->Status. Double Click on Program Name)
Once inside the program search for 'CL_EXITHANDLER=>GET_INSTANCE'.
Make sure the radio button "In main program" is checked.
A list of all the programs with call to the BADI's will be listed.
The export parameter 'EXIT_NAME' for the method GET_INSTANCE of class CL_EXITHANDLER will give you the BADI name for the Transaction.
Cheers
fareed -
Implementing sort functionality for Z fields in inbox items
Hi all,
i have a requirement where i got to add a Z-field in the "Sort by" as well as "Then Sort by" dropdown in the inbox search. I have managed to add the item, nevertheless, i am unable to implement the sort functionality for the same.
Can someone help?
Is there anyways of making this simple?
Thanks in advance,
NishaHi Jason,
thank you very much with the note 1388298 our
Z-fields on the web-dynpro for "Item Basic Data" are visible now.
We have also Z-fields for "Account Assignment".
This fields are still not available.
Is it also possible to add these fields with component configuration?
I haven't found anything in the oss.
You will get 10 points because my original question has been answered.
Thanks in advance for your help!!
Kind Regards
Stefan
Maybe you are looking for
-
How to show/highlight "Exception Sales"...
Dear Experts, I have a requirement to show/highlight "Exception Sales" for the different "Regions" then for the different Zones of the Region and then for the different Customers of the Zone. I have "Actual Sale" and "Target Sale" in my data, which I
-
Audio Meters "peak indicator" gets stuck after prolonged use of Premiere Pro CC.
Does anyone else have this issue? After using Premiere for a while (maybe an hour or so straight) the audio meters peak indicator will not reset when you start/stop. What do I mean? If your audio level peaks or goes into the red, it stays there like
-
Hello, I am hoping to upgrade my OS 9 machine to Tiger as I no longer have use for 9. I have the option to purchase a Tiger install DVD which is black with a grey X part #2z691-5599-a. Is this DVD a full install which will support wiping my hard driv
-
Dear Friends, We are informed about the change of name by the company, which is legal and we will update BUKRS accordingly. But, how can i find the dependent legal documents to change the company name in them ? At least for Forms i can check from S
-
Monitor SQL Server service Broker queue status
I need to monitor SQL Server service Broker queue status. If the queue is disabled, send me an email alert. Can you let me know what's the best way to accomplish it using SCOM?