power oid process should be recorded in the ODS. Table ODS_PROCESS
power oid process should be recorded in the ODS. Table ODS_PROCESS. but I do not see anything... and what are the commands to start/stop OID as do I, do me right if I'm not...oidmon connect = ldapdcx1 power
oidctl connect = server ldapdcx1 = config oidldapd = 2 = 3 start/start instance
SQL > select * from ODS. ODS_PROCESS;
no selected line
SQL > exit
Disconnected from the database to Oracle 10 g Enterprise Edition Release 10.1.0.5.0 - 64 bit Production
With partitioning, OLAP and Data Mining options
[dcxnim01]: [ldapdcx1]: = > ps - ef | grep oidldapd
Oracle 675894 1200310 0 09:16:40 pts/0 0:00 grep oidldapd
Oracle 938116 1 0 Jun 22 - 13:50 / oracle/product/oid10g/bin/oidldapd connect = ldapdcx1 Pei 389-i
3 - conf 2 - sport button 636 - sslenable 2 = 1085443401
1327250 1 0 22 Jun - 179:12 oidldapd Oracle
Connect = ldapdcx1 = 938116 = 1 worker dispatcher control = 2 debug = 33554432
ConfigSet = 2 instance = button 3 = host 1085443401 = dcxnim01 trcdimension = 511 logchange = TRUE port = 389 sport = 636
[dcxnim01]: [ldapdcx1]: = >
What version are you using?
To start the OID, you must use opmnctl command.
Greetings.
Tags: Fusion Middleware
Similar Questions
-
FETCH ONE RECORD IN THE SECOND TABLE OF CORRELATED SUB QUERY
Hi all
I have provided the script below, I want to single fecth record in the second table in the join query,
based on the example below, I want to go get one record of the table emp2 what matches with the emp_id of table emp1, please note emp2 may contain more record for the emp_id emp1 which respects
all records can be selected in the table emp2.
DROP TABLE emp1.
CREATE TABLE emp1 (emp_id NUMBER);
INSERT INTO emp1 VALUES (1);
INSERT INTO emp1 VALUES (2);
COMMIT;
DROP TABLE emp2.
CREATE TABLE emp2 (emp_id NUMBER, emp_name VARCHAR2 (100));
INSERT INTO emp2 VALUES (1, 'Name1');
INSERT INTO emp2 VALUES (2, 'Name2');
INSERT INTO emp2 VALUES (1, 'Name3');
INSERT INTO emp2 VALUES (2, 'Conjoint4');
COMMIT;
SELECT * from emp1.
SELECT * from emp2.
SELECT T1. EMP_ID, MIN (T2. EMP_NAME)
FROM EMP1, EMP2 T2 T1
WHERE T1. EMP_ID = T2. EMP_ID
GROUP T1. EMP_ID;
My output should be the same as the result set of query above, but I don't want this logic, please provide the solution by using a different logic, thanks in advance.
2811876 wrote:
Thanks for your comments :-)
My business logic will change to 'Fetch N second timeline table', that's the reason why I asked for a different approach, if I use max, min to achieve this does not allow me to evolve dynamically.
Although logic has not been expressed at all in your original question, so good job I asked.
You could do something like:
SQL > ed
A written file afiedt.buf1 with emp1 (select 1 as the emp_id of union double all the)
2. Select 2 double
3 )
4, emp2 (select 1 as emp_id, 'name 1' as emp_name double union all
5. Select "name 2' Union double every 2
6 select 1, 'name' 3' from dual union all
7. Select 2, 'name 4' double union all.
8 select 1, 'name 5' from dual union all '.
9 select 2, 'name 6' from dual '.
10 )
11-
12. end of test data
13-
14 select emp_id, emp_name
15 of)
16 select t1.emp_id, t2.emp_name
17, row_number() over (partition by order of t2.emp_name t1.emp_id) rn
emp1 t1 18
19 join t2 emp2 (t1.emp_id = t2.emp_id)
20 )
21 * where rn<=>=>
SQL > /.Enter the value for rows_required: 1
21 Alumni: where rn<=>=>
21 news: where rn<=>=>EMP_ID EMP_NA
---------- ------
1 name 1
2 name 2SQL > /.
Enter the value for rows_required: 2
21 Alumni: where rn<=>=>
21 news: where rn<=>=>EMP_ID EMP_NA
---------- ------
1 name 1
1 name 3
2 name 2
2 name 4 -
Add records in the target table
Hi all
I HAV done an interface for a simple source data transfer to the target. When I run it, the records are stored in the target table. Now, I want to launch the interface (for the same or different source table) and add the records to existing records in the target table.
Kindly guide me, explaining how shud I do the addition in the target table.
Thanks in advance.Hello
You can use the IKM control add... it will add records...
Thank you.
-
Records in the Child Table to return DBAT connector deletion and addition
I'm trying to add a record of the child to a resource DBAT (11.1.1.5). The structure of the Table is set up like this:
OIM_USR
Usr_key First name Last_name OIM_ROLE
USR_KEY ROLE_KEY Where OIM_USR is the parent, and OIM_ROLE is the child that can store multiple values per user. The problem arises when there is already an existing value in the child table. Consider the following example for instance
OIM_USR
Usr_key First name Last_name 45 John DOE OIM_ROLE
USR_KEY ROLE_KEY 45 2454 45 4453 If I add another line to the role of the identity UI table Edit tab added resource role, but IOM is remove the previous two lines and then adding them back. We know that it is because the source OIM_ROLE table contains a timestamp of creation triggered update time when a row is added. If I add a line to OIM_ROW then all three are getting updates for a reason any. We can also see the history of resource shows three updates. Inserting a record of the child should not call the process of update tasks. I've attached a screenshot of the history of the resource.
In addition, I upped the DBAT Connector logs and he showed a trace of remove:
DELETE FROM OIM_ROLES WHERE OIM_ROLES. USR_KEY =?
Why he deletes all children lines before an insertion?
I think you use OOTB DBAT connector without modification. I think that's how its design to add/change/delete files. For child process also updated form, we follow the same approach.
Are you facing any functional problem in connector DBAT to reach your use cases?
~ J
-
Selection of records in the same table problem
Hi all
I have the following table
My results should bewith emp as ( select '11' A,'aaa' B, '40' C from dual union all select '11','bbb', '40' from dual union all select '33','ccc', '30' from dual union all select '44','ddd', '20' from dual union all select '11','eee', '10' from dual )
Basically the requirement is select different combination of values in the column 'B' need to know what is the value of 'A' (it must be the same for all records of three)A B C 11 aaa 40 11 bbb 40 11 eee 10
Hope in this sense.
See you soon
Sexyan attempt to rephrase:
you want all the files "aaa", "bbb" and "EEA" where, for each set of column A, where they exist.
that is, if games to have only "aaa" and "bbb" but not "eee" in column B, then you don't want to retrieve this record?
Try this:
SQL> with emp as ( 2 select '11' A,'aaa' B, '40' C from dual union all 3 select '11','bbb', '40' from dual union all 4 select '33','ccc', '30' from dual union all 5 select '44','ddd', '20' from dual union all 6 select '11','kkk', '20' from dual union all 7 select '10','eee', '20' from dual union all 8 select '11','eee', '10' from dual 9 ) 10 select a, b, c 11 from (select emp.*, count(*) over (partition by a) cnt 12 from emp 13 where b in ('aaa','bbb','eee')) 14 where cnt = 3 15 / A B C -------------------------------- -------------------------------- -------------------------------- 11 eee 10 11 aaa 40 11 bbb 40 3 rows selected.
Published by: WhiteHat June 30, 2011 11:04
-
What is the preferred means of data transmission in the associative array of the nested table record vs
Choose between Nested Tables and associative arrays
The two nested tables and associative arrays (formerly index - by tables) use similar index notation, but they have different characteristics when it comes to persistence and ease of passing parameters.
Nested tables can be stored in a column of data, but can of associative arrays. Nested tables can simplify the SQL operations where you would normally join a single-column table with a larger table.
Associative arrays are appropriate for relatively small lookup tables where the collection can be constructed in memory whenever a procedure is called or a package is initialized. They are good for the collection of the information volume is unknown beforehand, because there is no fixed limit on their size. Their index values are more flexible, as associative array indices can be negative, can be no sequential and can use values of string instead of numbers.
PL/SQL automatically converts between the bays of the host and the associative arrays that use values of digital keys. The most effective way to move the collections to and from the database server is to implement data values in associative arrays, and then use these associative arrays with erections in bulk (the
FORALL
statement orBULK
COLLECT
clause).With the help of documents and Collections of PL/SQL
Read this:
-
DELETE_DOC and other records in the REVCLASSES table
Hello WebCenter content masters,
I am facing a strange and painful problem.
I have several documents with dDocName I got (not automatically generated). I deleted a bunch of them (about 100) using service RIDC DELETE_DOC. But when I try to check in new documents with the dDocName of these deleted items, I got an error:
intradoc.common.ServiceException:! csServiceDataException, CHECKIN_NEW_SUB, makeNewRevClass! $ * ScriptStack CHECKIN_NEW_SUB
3:doScriptableAction, dDocName is 638470463:doSubService, dDocName = 63847046CHECKIN_NEW_SUB, dDocName = 638470463:makeNewRevClass, dDocName = 63847046
...
Caused by: intradoc.data.DataException:! csDbUnableToExecuteQuery, IrevClasses (INSERT INTO RevClasses (dRevClassID\, dDocName\, dDocCreator\, dDocCreatedDate\, dDocLastModifier\, dDocLastModifiedDate\, dDocOwner\, dDocFunction) VALUES(2894314\, '63847046'\, 'admin'\, {ts '2013-06-11 09:15:59.745'}\, 'admin'\, {ts '2013-06-11 09:15:59.745'}\, 'admin'\, ''))! $ORA - 00001: unique constraint (PRD_OCS. DDOCNAME_REVCLASSES) violated
...
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (PRD_OCS. DDOCNAME_REVCLASSES) violated
So, I checked the REVCLASSES table and was surprised to see there are still records of deleted documents.
Select * from documenthistory where ddocname = '63847046' order of dactiondate desc;
24/05/13 14:13, 000000000 121467985 2172024 2172070 admin 63847046 delete Document Public
24/05/13 14:13, 000000000 121468000 2172024 2172070 admin 63847046 remove public review
15/05/13 02:04, 000000000 121481564 2172024 2172070 admin 63847046 Checkin Public
Select * from revision where ddocname = '63847046';
vacuum
Select * from revclasses where ddocname = '63847046';
2172070 63847046 2172024 15/05/13 02:04:41, System 455000000 15/05/13 02:04:41, 000000000 admin admin (null)
I can't understand what has happened and cannot reproduce the problem. Normally, I delete with DELETE_DOC no more documents exist in the REVCLASSES table.
I tried to run a Cycle of regeneration Collection, thinking it would be to clean up the database, but to no avail.
So my question is: is it possible to sort a cleaning of the database, which would remove this kind of mistake? or do I have to manually remove these records 'ghosts'?
Thank you for reading.
Hello!
You could run a check of database with the IdcAnalyze cmdlet.
This tool checks the tables and detect inconsistencies.
You will find in $DOMAIN_HOME/ucm/cs/bin
If there is something wrong, it will be detected and IdcAnalyze will generate scripts to correct inconsistencies.
Roman.
-
Insert the record in the second table by making the trigger on the first table
I hv created 2 tables as shown below the code sql. I want to insert some record (line current value) column of the first table, next sequence value and sysdate into second table. I hv created trigger but I gave warning.
so I want to know what is the problem in my sql code.
Pls correct!
SQL > create table myuser1 (u_id varchar2 (10), uname varchar2 (20), sex char(1));
SQL > create table myuser2 (reg_no number (5), reg_date Date, u_id varchar2 (20));
SQL > create the sequence myuser2_seq;
SQL > alter table myuser1 add constraint pk_myuser1 key (u_id) primary;
SQL > alter table myuser2 add constraint pk_myuser2 key (reg_no) primary;
SQL > CREATE TRIGGER MYTRIGGER
2 AFTER INSERT ON myuser1
3 FOR EACH LINE
4 BEGIN
5 INSERT INTO myuser2 (reg_no, reg_date, u_id)
6 VALUES (myuser2_seq.nextval, SELECT SYSDATE FROM DUAL, select u_id myuser)
1)
7 END;
8.
WARNING: Trigger created with compilation errors.JKMourya wrote:
I hv created 2 tables as shown below the code sql. I want to insert some record (line current value) column of the first table, next sequence value and sysdate into second table. I hv created trigger but I gave warning.
so I want to know what is the problem in my sql code.
Pls correct!SQL > create table myuser1 (u_id varchar2 (10), uname varchar2 (20), sex char(1));
SQL > create table myuser2 (reg_no number (5), reg_date Date, u_id varchar2 (20));
SQL > create the sequence myuser2_seq;
SQL > alter table myuser1 add constraint pk_myuser1 key (u_id) primary;
SQL > alter table myuser2 add constraint pk_myuser2 key (reg_no) primary;
SQL > CREATE TRIGGER MYTRIGGER
2 AFTER INSERT ON myuser1
3 FOR EACH LINE
4 BEGIN
5 INSERT INTO myuser2 (reg_no, reg_date, u_id)
6 VALUES (myuser2_seq.nextval, SELECT SYSDATE FROM DUAL, select u_id myuser)
1)
7 END;
8.WARNING: Trigger created with compilation errors.
SELECT inside VALUES clause is NOT allowed.
do SELECT statements before the INSERT command -
Insert records in the W_EXCH_RATE_G table.
Hi all
Can someone help me with the following scenario.
I would like to know how to insert additional record of exchange rates in the W_EXCH_RATE_G table in the data warehouse.
I checked records in this table ate PS_RT_RATE_TBL of peoplesoft.
But I have just a flat file and I have to complete additional registration.
Can you let me know if I have to use and update the query to do the same thing or do I change the mapping in Informatica?
Thanks for the help in advance!
-NikkiNikki, see also my response to your similar message: -.
Change SIL_GLBalanceFact to populate the Balance_Global1_Amt column.
Please indicate if helpful/useful.
Andy. -
need of sql to develop under records in the psrecdefn table
Salvation be,.
I'm looking for an application to expand the subrecords table psrecdefn.
Example of
Select RECNAME, FIELDNUM, FIELDNAME, UNDER-REGISTRATION
of psrecfield
VCHR_VNDR_INFO 1 BUSINESS_UNIT N
VCHR_VNDR_INFO 2 VOUCHER_ID N
VCHR_VNDR_INFO NAME1 3 N
VCHR_VNDR_INFO NAME2 4 N
VCHR_VNDR_INFO 5 EMAILID N
VCHR_VNDR_INFO 6 ADDRESS_SBR Y
I need an exit more like... expansion of ADRESS_SBR (i.e. under record)
VCHR_VNDR_INFO 1 BUSINESS_UNIT N
VCHR_VNDR_INFO 2 VOUCHER_ID N
VCHR_VNDR_INFO NAME1 3 N
VCHR_VNDR_INFO NAME2 4 N
VCHR_VNDR_INFO 5 EMAILID N
ADDRESS_SBR 1 COUNTRIES N
ADDRESS_SBR ADDRESS1 2 N
ADDRESS_SBR ADDRESS2 3 N
ADDRESS_SBR 4 ADDRESS3 N
ADDRESS_SBR 5 ADDRESS4 N
generalize way!
Thank you!Try using PSRECFIELDDB instead of PSRECFIELD. I think this would probably work better for you.
-
Using JOIN to two tables to find records in the second table...
I always seem to get these types of queries wrong and need a bit of help:
I have a MARKETER_ACCOUNT relationship table and another table of pending relationships called ACCOUNT_ENROLLMENT.
I have accounts that can register with a MARKETING agent. They enter the table ACCOUNT_ENROLLMENT pending and a certain Effective Date the active go and then move to the MARKETER_ACCOUNT table. If a relationship ends, it can end in any event if registering with another buyer or if no registration pending they are supposed to be going back to the parent company.
So I want to find all the records that came back to the parent company (that is, they may not have a case pending in the ACCOUNT_ENROLLMENT of the table, but have an end date in the MARKETER_ACCOUNT table):
Select * MARKETER_ACCOUNT m
where M.account_no NOT IN (select E.account_no from ACCOUNT_ENROLLMENT E
where E.effective_date between 8 December 2009 "-January 7, 2010")
and M.expiration_date between 8 December 2009 "-January 7, 2010;
This request is still in progress, and I don't know where I am going wrong. I mean GIVE me all the accounts in the table MARKETER_ACCOUNT that have a date of expiry from December 7, 2009 "-January 7, 2010 ' and where these accounts are NOT pending in the ACCOUNT_ENROLLMENT table, where the entry into force is for the same period."
Any help would be greatly appreciated.
SeanPerhaps you could try the version NOT EXISTS in the query:
SELECT * FROM MARKETER_ACCOUNT M WHERE NOT EXISTS ( SELECT NULL FROM ACCOUNT_ENROLLMENT E WHERE M.ACCOUNT_NO = E.ACCOUNT_NO AND E.EFFECTIVE_DATE BETWEEN TO_DATE('08-DEC-2009','DD-MON-YYYY') AND TO_DATE('07-JAN-2010','DD-MON-YYYY') ) AND M.EXPIRATION_DATE BETWEEN TO_DATE('08-DEC-2009','DD-MON-YYYY') AND TO_DATE('07-JAN-2010','DD-MON-YYYY');
If not, check out these discussions:
{message: id = 1812597}
{: identifier of the thread = 863295}
-
finding duplicate records in the DB table, or the data trasnpose
Hello
I have a question...
Key | UID. Start Dt | End date. / / DESC
--------------------------------------------------------------------------------
1. 101 | March 12 09 | 30 May 09 | UID101
2. 101 | January 1 09 | February 25 09 | UID101
3. 102. 13 March 09 | 30 March 09 | UID102
4. 103. 13 March 09 | 30 March 09 | UID103
5. 103. 13 March 09 | April 1 09 | UID103
6. 104. 13 March 09 | 30 May 09 | UID104
7. 104. February 25 09 | 29 May 09 | UID104
8. 105. 15 February 09 | March 1 09 | UID105
9. 105. April 1 09 | 30 May 09 | UID105
The query must know UID in duplicate according to the above data, which are stored in the same form in a table. The definition of the UID duplicate is
(1) UID repeating themselves (records by 2) ex are 101,103,104 and 105.
(2) each UID has two dates and date of end of beginning.
(3) the UID for which dates are overlaping. For ex: touch #4, 103 UID whose start dates are March 13 09-30-Mar-09 and there also another record, with the # 5 UID 103 key dates are 13 Mar 09 to 1 April 09. Here, there is overlap or intersection in line #4 with key #5 key dates dates of rank. This UID is duplicated UID by def.
What precedes that falls under def and selectable are 103 and 104 only 102 UID has only a single line, UID 105 dates are mutually exclusive or not that overlap and even for the UID.
Is there a function available DB to make use of?
Wanted not to delete records or duplicate records.
There is a report to display these duplicate records.
It would be good for me if I can get the data transposed for UID
as
Of
4. 103. 13 March 09 | 30 March 09 | UID103
5. 103. 13 March 09 | April 1 09 | UID103
TO
UID. Start the t1d. End t1d. Start the T2D. End T2D
103: |13-Mar-09|30-Mar-091-Apr-09 13 March 09
Any advice or ideas can be useful to gr8
Thank you...It can also be done without Analytics:
WITH test_data AS ( SELECT 1 AS KEY, 101 AS UD, TO_DATE('03/12/2009','MM/DD/YYYY') AS START_DT, TO_DATE('05/30/2009','MM/DD/YYYY') AS END_DT, 'UD101' AS DSC FROM DUAL UNION ALL SELECT 2 AS KEY, 101 AS UD, TO_DATE('01/01/2009','MM/DD/YYYY') AS START_DT, TO_DATE('02/25/2009','MM/DD/YYYY') AS END_DT, 'UD101' AS DSC FROM DUAL UNION ALL SELECT 3 AS KEY, 102 AS UD, TO_DATE('03/13/2009','MM/DD/YYYY') AS START_DT, TO_DATE('03/30/2009','MM/DD/YYYY') AS END_DT, 'UD102' AS DSC FROM DUAL UNION ALL SELECT 4 AS KEY, 103 AS UD, TO_DATE('03/13/2009','MM/DD/YYYY') AS START_DT, TO_DATE('03/30/2009','MM/DD/YYYY') AS END_DT, 'UD103' AS DSC FROM DUAL UNION ALL SELECT 5 AS KEY, 103 AS UD, TO_DATE('03/13/2009','MM/DD/YYYY') AS START_DT, TO_DATE('04/01/2009','MM/DD/YYYY') AS END_DT, 'UD103' AS DSC FROM DUAL UNION ALL SELECT 6 AS KEY, 104 AS UD, TO_DATE('03/13/2009','MM/DD/YYYY') AS START_DT, TO_DATE('05/30/2009','MM/DD/YYYY') AS END_DT, 'UD104' AS DSC FROM DUAL UNION ALL SELECT 7 AS KEY, 104 AS UD, TO_DATE('02/25/2009','MM/DD/YYYY') AS START_DT, TO_DATE('05/29/2009','MM/DD/YYYY') AS END_DT, 'UD104' AS DSC FROM DUAL UNION ALL SELECT 8 AS KEY, 105 AS UD, TO_DATE('02/15/2009','MM/DD/YYYY') AS START_DT, TO_DATE('03/01/2009','MM/DD/YYYY') AS END_DT, 'UD105' AS DSC FROM DUAL UNION ALL SELECT 9 AS KEY, 105 AS UD, TO_DATE('04/01/2009','MM/DD/YYYY') AS START_DT, TO_DATE('05/30/2009','MM/DD/YYYY') AS END_DT, 'UD105' AS DSC FROM DUAL ) select t1.ud, t1.key, t1.start_dt, t1.end_dt, t2.key, t2.start_dt, t2.end_dt from test_data t1 , test_data t2 where t1.ud = t2.ud and t1.key < t2.key and ((t1.end_dt - t1.start_dt) + (t2.end_dt - t2.start_dt)) > (greatest(t1.end_dt, t2.end_dt) - least(t1.start_dt, t2.start_dt)) /
Result:
UD KEY START_DT END_DT KEY START_DT END_DT ---------- ---------- ---------- ---------- ---------- ---------- ---------- 103 4 13-03-2009 30-03-2009 5 13-03-2009 01-04-2009 104 6 13-03-2009 30-05-2009 7 25-02-2009 29-05-2009
In addition, you will need to adjust the date a little comparison, depending on whether you set two periods where the first End_date is equal to the start_date in the second, because duplication or not.
Published by: tijmen on December 21, 2009 06:17
-
Findout incompatibility records between the two tables.
I need help on findout the unmatched records between two different tables.
Each table has a + 42Crores Records.
The type of data (Char) are the same for the two tables but datalength is different between a table and the table B.
Indexes are created on the two tables on the required fields
There is no Geom data exists on the two tables.
For example:
A Table: =.
Number of records + 42Crores
Rating: TOLD char (20)
Table B: =.
Number of records + 42Crores
Field: TOLD Char (16)
I took individual accounts, there are number of difference is 3868 only, with respect to the count (*) selection.
I ran the query "Select TOLD OF A LESS SELECT TOLD OF B", but I don't have the answer.
Please let me know how to solve the problem.The variable length char shouldn't be a problem...
You just need to ensure that the first table has more lines than the second, if the problem persists You ' l I hide it, and then use a column alias...Let know us...
-
Compare several records in the same table
Hello, I m writing a bat file so I can export information that I question.
I have an automatic integration which checks from time to time if there is no new client´s and generates a trigger.
If an error levonorgestrol I the process is repeated until the client is located in the database.
I can't create tables or change the structure.
My problem is that I need to compare the record more updated with the CLIENT_ID field
Let me give you an example:
Table A
ERROR_MESSAGE CREATEDUSERID CLIENT_ID
0 success 01/01/2009
1 error 01/01/2009
2 success 01/01/2009
1 success 01/02/2009
3 success 01/02/2009
4 error 01/02/2009
I need to compare "1" client created on 01/01/2009 this error gived with new records to see if there's success and my
query should only return the client_ID '4' and export with sqlplus
Could you please help me?Hello
It works very well with my data.
What data do you use? After a few lines of sample data (CREATE TABLE AS executable... or INSERT... statements are best) that give you wrong results.Make sure that everything is spelled correctly.
For example, roughly halfway through the query, you sayand io.status = 'Erro'
and at the end you say
having max(decode(io.status, 'Error', 1, 2)) ...
That is the same ("Error" or "Error") in both places?
-
Compare the records from the same table
Hi all
I have this sample, the data were rendered are group by my_id, the same number of records exist for the two my_ids (2 and 62) as:
create table myTest as ( my_id number, fieldA varchar2, fieldB number, fieldC number, cost_A number, cost_B number ) insert into myTest (my_id, fieldA, fieldB, fieldC, cost_A, cost_B) values (2, 'MAINT', 60, 5, 10.3, 15.00); insert into myTest (my_id, fieldA, fieldB, fieldC, cost_A, cost_B) values (2, 'MAINT', 70, 6, 20.3, 25.00); insert into myTest (my_id, fieldA, fieldB, fieldC, cost_A, cost_B) values (2, 'MAINT', 80, 7, 30.3, 35.00); insert into myTest (my_id, fieldA, fieldB, fieldC, cost_A, cost_B) values (62, 'MAINT', 60, 5, 10.3, 5.00); insert into myTest (my_id, fieldA, fieldB, fieldC, cost_A, cost_B) values (62, 'MAINT', 70, 6, 20.3, 25.00); insert into myTest (my_id, fieldA, fieldB, fieldC, cost_A, cost_B) values (62, 'MAINT', 80, 7, 10.3, 15.00);
How can display the records with numbers of different costs for the same unique key (fieldA, fieldB and FieldC)?
With the help of Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0.
I hope that my message is clear.
Thank you!
Hello
user9542267 wrote:
... I need all the exits...
Me too. Always show the complete, accurate, results you want from the data provided. If you want 2 rows at the exit point, don't tell you want 1.
Here are the results you want?
MY_ID FIELDA, FIELDB, FIELDC OLD_COST_A COST_A OLD_COST_B COST_B
------ ---------- ------ ------ ---------- ------ ---------- ------
MAINT 62 60 5 10.3 10.3 15 5
MAINT 62 80 7 30.3 10.3 35 15
If so, here's a way to get them:
WITH got_old_costs AS
(
SELECT fielda, fieldb, fieldc, cost_a, my_id, cost_b
, LAG (cost_a) OVER (PARTITION BY fielda, fieldb, fieldc)
ORDER BY my_id
) AS old_cost_a
, LAG (cost_b) OVER (PARTITION BY fielda, fieldb, fieldc)
ORDER BY my_id
) AS old_cost_b
OF mytest
WHERE my_id IN (2, 62)
)
SELECT my_id, fielda, fieldb, fieldc
old_cost_a, cost_a
old_cost_b, cost_b
OF got_old_costs
WHERE my_id = 62
AND (cost_a <> old_cost_a)
OR cost_b <> old_cost_b
)
ORDER BY fielda, fieldb, fieldc
;
Maybe you are looking for
-
Thunderbird updated to 24.5.0 but I need to know with certainty that the Lightning has a compatible version before doing the update. Cannot afford to lose this calendar. When I look at the mozilla lightning site, it shows the current version, the one
-
E-mail messages are placed in the basket several times every minute during the strike.
E-mail messages are placed in the basket several times (every minutes) while I'm typing / dial. I didn't until I visited my trash to remember something. How do I get this stopped?
-
My Qosmio F60 graphics card crashes often
Hi guys. Hoping for some advice/corrections. I now have a F60 for about three weeks.The thing is great with the exception of a significant drawbacks. The screen will either sometimes go to pieces then turn black and then turns back on nothing similar
-
15 r007TX 15 HP laptop: HP laptop screen stays black with the mouse cursor flashing
Hello Here I am facing probhlem. my laptop is started but screen stays black and a slider is binking on that... I just perform a clean boot and once I restarted my laptop and then I faced this problem... Please help me... I have laptop HP 15 15-r007T
-
Cannot control the color sensor in LabView for Mindstorms
Hello! New here. I'm currently boning on LabView via 'LabView for Lego Mindstorms' for a possible job in the near future, and I encountered a problem from the beginning. I am programming my brick Lego of LabView to simply activate the color sensor w