How to select records from an object of type
CREATE TABLE BOOKING_ITERATION
(
SK_BOOKING_ID NUMBER(20) NOT NULL,
BOOKING_TRANS_DATE DATE NOT NULL,
LAST_CALCULATED_DATE DATE,
MAX_CALCULATED_TOLERANCE NUMBER(2),
CALCULATION_SUCCESSFUL_IND VARCHAR2(1 BYTE),
BOOKING_CALC BOOKING_CALC_ATTRIBUTES_T
)
CREATE OR REPLACE /* Formatted on 24/06/2009 14:57:50 (QP5 v5.115.810.9015) */
TYPE booking_calc_attributes_t AS OBJECT(
booking_rec top_bkg_basic_rec_t,
accom_costs_initialsed VARCHAR2(1),
flight_costs_initialsed VARCHAR2(1),
fin_details_initialsed VARCHAR2(1),
business_transaction_id INTEGER,
accom_unit_service_id INTEGER,
product_id INTEGER,
subproduct_id INTEGER,
subproduct_code VARCHAR2(3)
)
now my requirement is to select values in the table BOOKING_ITERATION where product_id = 101can you please advise me on how to do it.
Concerning
Nested object type attributes can be considered with the notation by simple point. However, this is slightly obscured by the fact that a table alias is required for name resolution. I hope that this example will help...
SELECT bi.sk_booking_id
FROM booking_iteration bi
WHERE bi.booking_calc.product_id = 101;
Tags: Database
Similar Questions
-
How to select records in the duplicate and two copies lines no rows
Hello
I'm working on Oracle with the following details
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64 bit Production
With partitioning, OLAP and Data Mining options
I need help to choose one of the duplicate records and a few duplicate not based on condition. I wrote the script that only gives me one of the record list duplicate, but I'm confused how select duplicate duplicates.
My condition is to select all records where TARGET TABLE AND TARGET_COLUMN IS NOT NULL. I need to select unique records of this this condition based on these attributes only Anwar. _
_ From the SOURCE
TARGET_TABLE TARGET_COLUMN SRC_COLUMN
-----
--------------------
-----
SRC_EXTERNAL SUBJECT_AREA SUBJECT_AREA
FISCAL_YEAR FISCAL_YEAR SRC_EXTERNAL
PARTY_ID_ORG PARTY_ALT_ID PARTY_ID
PARTY_ID_NEW PARTY_ALT_ID PARTY_ID
ESTABLISHMENT_NBR_ORG W2_EMPLOYER ESTABLISHMENT_NBR
ESTABLISHMENT_NBR_NEW W2_EMPLOYER ESTABLISHMENT_NBR
EMPLOYMENT_CODE_ORG W2_EMPLOYER EMPLOYMENT_CODE
EMPLOYMENT_CODE_NEW W2_EMPLOYER EMPLOYMENT_CODE
SICK_PAY_IND_ORG W2_EMPLOYER SICK_PAY_IND
SICK_PAY_IND_NEW W2_EMPLOYER SICK_PAY_IND
AGENT_IND_CODE
AGENT_FEIN
EMPLOYER_NAME
EMPLOYER_ADDRESS
CLIENT_ADDRESS
CITY
STATE
ZIP
_ REQUIRED TARGET
TARGET_TABLE TARGET_COLUMN SRC_COLUMN
-----
--------------------
-----
SICK_PAY_IND_NEW W2_EMPLOYER SICK_PAY_IND
EMPLOYMENT_CODE_NEW W2_EMPLOYER EMPLOYMENT_CODE
ESTABLISHMENT_NBR_NEW W2_EMPLOYER ESTABLISHMENT_NBR
PARTY_ID_NEW PARTY_ALT_ID PARTY_ID
SRC_EXTERNAL SUBJECT_AREA SUBJECT_AREA
FISCAL_YEAR FISCAL_YEAR SRC_EXTERNAL
MY QUERY_ +.
SELECT NOMFICHIER_SRC, TARGET_TABLE, SRC_COLUMN, TARGET_COLUMN
OF ITS_STAGE. STG_EDW_METADATA X
WHERE TARGET_TABLE IS NOT NULL AND TARGET_COLUMN IS NOT NULL
AND ROWID & gt; (SELECT MIN (ROWID)
OF ITS_STAGE. STG_EDW_METADATA Y
WHERE TARGET_TABLE IS NOT NULL AND TARGET_COLUMN IS NOT NULL
AND Y.TARGET_TABLE = X.TARGET_TABLE
AND Y.TARGET_COLUMN = X.TARGET_COLUMN)
MY RESULTS+ _
TARGET_TABLE TARGET_COLUMN SRC_COLUMN
-----
--------------------
-----
SICK_PAY_IND_NEW W2_EMPLOYER SICK_PAY_IND
EMPLOYMENT_CODE_NEW W2_EMPLOYER EMPLOYMENT_CODE
ESTABLISHMENT_NBR_NEW W2_EMPLOYER ESTABLISHMENT_NBR
PARTY_ID_NEW PARTY_ALT_ID PARTY_ID
Can some Oracle expert please help me solve this problem.
Thanks in advance
Rajesh
Published by: user532468 on 15 Sep, 2008 14:32With the help of
AND ROWID * > * (SELECT MIN (ROWID)
you select duplicates. Just change of
AND ROWID * = * (SELECT MIN (ROWID)
This will select everyring but duplicates. However, it is not effective. All you need is:
SELECT SRC_FILENAME,SRC_COLUMN,TARGET_TABLE, TARGET_COLUMN FROM (SELECT DISTINCT * FROM ITS_STAGE.STG_EDW_METADATA X WHERE TARGET_TABLE IS NOT NULL AND TARGET_COLUMN IS NOT NULL)
SY.
-
How to select Records databases on a group
Have a nice day together.
I have two tables and their records are inserted as below.
1. CREATE THE INVOICE_HEADER TABLE (INVOICE_NUMBER NUMBER (6), VAT_INDICATOR CHAR (1));
insert into invoice_header values('000001','E');
2. CREATE THE INVOICE_SELECTOR TABLE (INVOICE_NUMBER NUMBER (6), INVICE_LINE VARCHAR2 (3), APPROVED_INDICATOR CHAR (1));
insert into invoice_selector values('000001','A00','Y');
insert into invoice_selector values('000001','B00','N');
Now, I want to show the invoice_number '000001' only if the approved flag is set to 'Y' for the two invoice lines. If one of the two has the value "n" while the header should not be recovered.
I tried this using pl/sql. But do I know what a concept I'd be familiar in SQL. I am pleased that those who are interested in helping.
Thank you
Mohammed
Set serveroutput on;
declare
flag_set VARCHAR2 (1);
Start
FOR (IN) logi
Select inh.invoice_number in the inh invoice_header join invoice_selector ivs
We inh.invoice_number = ivs.invoice_number)
loop
for log base 2 in (select INVICE_LINE from the invoice_selector where invoice_number = logi.invoice_number)
loop
If (log2.invice_line = 'Y') then
flag_set: = 'Y ';
-dbms_output.put_line ("No Found Bill" | logi.invoice_number);
on the other
-dbms_output.put_line ("Found Bill" | logi.invoice_number);
flag_set: = 'n';
end if;
end loop;
end loop;
If flag_set = "Y" then
dbms_output.put_line ('valid invoice");
on the other
dbms_output.put_line ('invalid invoice");
end if;
end;
Select * from invoice_header:
where there is not (select null to s invoice_selector
where s.invoice_number = h.invoice_number
and (s.approved_indicator! = 'Y' or s.approved_indicator is null))
-
How to select record Datestamp Maximum
It's data.
The number Type Datestamp
IM10134 001 was 10413 Open 2010-07-19 07:51:43.000
IM10134 001 has 10424 Status Change-2010-08-02 09:45:27.000
IM10134 001 A 10425 provider external assignment 2010-08-02 09:45:27.000
IM10134 001 A 10426 update 2010-08-02 09:47:49.000
I want results for the following fields. So the result is
The number Type Datestamp
IM10134 001 A 10426 update 2010-08-02 09:47:49.000
How to select this folder only
Kindly help me.You can try:
SELECT x.number,y.thenumber,y.type,x.date_stamp FROM (SELECT number,MAX(datestamp) date_stamp FROM table_name GROUP BY number) x, table_name y WHERE x.number = y.number AND x.date_stamp = y.datestamp; /
-
Query regarding recovery of selected records from table
Hi all
I have a table as below:
NUM1 NUM2 TYPE
1 2
1 2 S
2 3 S
3 4
3 4 S
4 5S
If for a record TYPE = 'A' then do not select the records for these num1 and num2.
For example: for 1 = num1 and num2 = 2 there are two records with type = 'A' and ', recorded only with the type 'A' should be selected.
Output should be like this:
NUM1 NUM2 TYPE
1 2
2 3 S
3 4
4 5S
Please could someone help me in this query.
Any help would be much appreciated.
Thanks and greetings
AnujJust the MIN function will get what you want
SQL> with t 2 as 3 ( 4 select 1 num1, 2 num2, 'A' type from dual union all 5 select 1, 2, 'S' from dual union all 6 select 2, 3, 'S' from dual union all 7 select 3, 4, 'A' from dual union all 8 select 3, 4, 'S' from dual union all 9 select 4, 5, 'S' from dual 10 ) 11 select num1, num2, min(type) type 12 from t 13 group by num1,num2 14 order by num1,num2 15 / NUM1 NUM2 T ---------- ---------- - 1 2 A 2 3 S 3 4 A 4 5 S
-
How to exclude records from the outer query
My apologies if this was requested. I find no answer. I don't know what terminology should be for that matter.
In simple terms, I want to use the custom in where clause to select records. Problem is function will fail if applied to old records, as there was no relevant data. I have logic to exclude old records, but the problem is that this process running function before old records are excluded. I tried an inside view to exclude records before their passage in the outer query, but this does not resolve the situation.
Below shows high level required
Select x
tab
where (condition to exclude the old records)
and function (tab.y) = value
If I rewrite as below, still have the problem. Was hoping to exclude former records apply before function.
Select inn.x
Of
(select x,
There
tab
where (condition to exclude the old records)) inn
where function (inn.y) = value
Thank you
Hello
Including ROWNUM in the result set of the query-void will force the subquery to do first:
Select inn.x
Of
(select x,
There,
ROWNUM AS r
tab
where (condition to exclude the old records)
) inn
where the function (inn.y) = some_value
Since ROWNUM depends on the WHERE clause of the query-sup, the query cannot be rewritten to the main to do first query WHERE clause.
-
How to select data from a remote database table?
Hi friends,
I think I've seen before a sqlplus program that can select data from a remote database table?
Witnessed: IP, SID, PORT
The following is correct?
(I am connected to a local database)
SELECT COUNT (*) IN THE EMP@IP:SID/PORT;
Thank you very much
Ms. KSalvation;
I think, that you can create dblink wihtout any problem yet, it's a PROD. After your selection, you can drop dblink
Respect of
HELIOS -
Form check synchronize on Popup to the selected record from the table
I'm trying to recreate what I did on the portals of the OAS in Weblogic/ADF. I have JDeveloper 11.1.1.2.0. What I do seems to be a little different than the tutorials: I need something like the tutorial master-detail, but instead the details appearing on the same page, it should appear in a popup. I managed to build the part table/popup. But when the popup appears, it displays the wrong record. Here are the steps I used to create this page:
After you create the ADF Fusion Middleware project:
1 create templates for the tables I need.
2. create the JSF Page.
3 drop panelCollection on the page.
4. remove my data to see in panelCollection control and choose the Table read-only ADF. Select the sorting and selection options.
5 change table properties: selected = DisplayRow, EditingMode = clickToEdit
6 drag the Popup on the page.
7. remove my data from view in popup control and choose the form of the ADF. Select the send option.
8 drop showPopupBehavior on the page. Name of the popup. The value triggerType to the 'selection '. (triggerType "click" works, too)
9 deploy.
The table is displayed. I click on a line. The pop-up window appears. The form of popup displays the first record in the table. I click on any line.
I just bought the merger Oracle 11g Developer Guide, but were not able to answer this question yet.
Any ideas?
Thank you.See this video for how it works for me:
http://www.ScreenToaster.com/watch/stWUtcRkVLQ1BcSV1aX15Q -
How to delete records from a table that has a composite unique key duplicate
Hello
I get the customer data from various sources in the staging of the table where I insert in the database table where the combination of two columns is considered as a unique key. But there is a possibility of duplicates. How to find duplicates in a SQL or pl/sql
Thank you
Manoi.Kassa,
You can see the duplicates by using the following query...
sql> select * from temp_rajesh; COL1 COL2 MESSAGE ---------- ---------- ------------------ 100 200 message 100 200 message2 300 400 message3 400 500 message 4 sql> select col1, col2, count(*) 2 from temp_rajesh 3 group by col1, col2 4 having count(*) > 1; COL1 COL2 COUNT(*) ---------- ---------- ---------- 100 200 2
-If in the case of duplicate records, you should see only the duplicates (according to some timestamp etc., you can use the functinon row_number analytic..)
1 select col1, col2 from ( 2 select col1, col2, 3 row_number() over (partition by col1, col2 4 order by message) rn 5 from temp_rajesh) 6* where rn > 1 sql> / COL1 COL2 ---------- ---------- 100 200
In the above example, I use message to order, you can replace it with activity_timestamp or the insertd_date according to your logic... when there are two records... one that you choose to duplicate.
Thank you
Rajesh.Published by: Rajesh Chamarthi on November 20, 2009 12:05 AM (added for example)
-
How to return records from a MS SQL Database
I created a form in Adobe LiveCycle 9. Configure a new data connection to a database on my MS SQL 2008 Server. I can see my data fields to sql tab data connection and they linked to my fields in my form. The form fills with information from the first record in my database.
I would like to create a field in my form where my users could enter an account number and then my fields would fill this folder. Right now I don't see registration with account number 1.
Any help would be appreciated.It is a mistake to Microsoft security and I think that this has to do with WHO (including rights) created theDSN. You can do a search on the web to see how to overcome... .or I have always used the admin account to add the DSN and not had the problem.
Paul
-
How can we record from the internet?
HP Pavilion HPE h8 - 1360t, Windows 7 Home Premium 64 - bit SP1
We tired Sound Recorder (supplied with the computer), Windows Media Player, Free Sound Recorder (which we always used on our old DELL), Audacity and others without success. The best we get is distorted and the volume is low. Search internet and support the application of various without a bit of luck.
Hello
To help us respond more quickly, please read this:
http://h30434.www3.HP.com/T5/first-time-here-learn-how-to/welcome-get-started-here/TD-p/699035
You can wat to try this:
http://www.howtogeek.com/HOWTO/39532/how-to-enable-stereo-mix-in-Windows-7-to-record-audio/
Kind regards.
-
How replicates all records from one table to another table without using expdp, impdp
Hi I have two database in a database, that I have a table called t1 and another base data, I have the second table .so, my first table have records, that I need to transfer all records second T2 without use of expdp and impdp in every 5 min... what I do
??
The best solution for this scenario is to use Oracle Golden Gate
However, it requires a license, and you must pay for it.
If this is not possible, you can create a job scheduler that uses a link DB in order to reproduce the recordings of the target database, but it will take the entire table to the target database and then INSERT AS SELECT truncate the data of the entire table every time that the job is running (because you can't follow only the records that have been changed or modified).
In addition, read here on the replication of data using materialized views.
-
How to delete records from a table?
It comes to my table structure:
Here are some insert statements to populate the table. *(About a 100 of them, please Bear with me) *.create table BILLS ( bill_id VARCHAR2(20), trx_no VARCHAR2(20), item_code VARCHAR2(3), amount NUMBER, item_id NUMBER, invoice_dt DATE )
It comes to my select statement.insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104173960', '910873', '002', 432, 351, to_date('04-03-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104209800', '910873', '002', 432, 351, to_date('04-04-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104212747', '263156', '039', 230, 351, to_date('01-04-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104269414', '263156', '039', 230, 351, to_date('01-06-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104360446', '263156', '039', 230, 351, to_date('01-09-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104577673', '910873', '002', 432, 351, to_date('04-04-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104608668', '910873', '002', 432, 351, to_date('04-05-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104611586', '263156', '039', 230, 351, to_date('01-05-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104642560', '910873', '002', 432, 351, to_date('04-06-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104699154', '910873', '002', 432, 351, to_date('04-08-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104820820', '263156', '039', 230, 351, to_date('01-12-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104826028', '910873', '002', 432, 351, to_date('04-12-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104850631', '910873', '002', 432, 351, to_date('04-01-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104885554', '263156', '039', 230, 351, to_date('01-02-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104926901', '910873', '002', 432, 351, to_date('04-03-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104936656', '263156', '', 15, 247, null); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104996320', '263156', '039', 230, 351, to_date('01-05-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105030104', '263156', '039', 230, 351, to_date('01-06-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105176803', '910873', '002', 432, 351, to_date('04-10-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105217998', '910873', '002', 432, 351, to_date('04-11-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105253306', '263156', '039', 230, 351, to_date('01-12-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105280152', '263156', '039', 230, 351, to_date('01-01-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105318072', '910873', '002', 432, 351, to_date('04-02-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105449712', '910873', '002', 432, 351, to_date('04-06-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105579048', '910873', '002', 432, 351, to_date('04-10-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105611201', '263156', '039', 230, 351, to_date('01-11-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105679991', '263156', '011', 196.56, 351, to_date('06-01-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105686749', '910873', '002', 432, 351, to_date('04-01-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105816473', '910873', '002', 432, 351, to_date('04-05-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105846525', '263156', '011', 230, 351, to_date('01-06-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105778111', '910873', '002', 432, 351, to_date('04-04-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104958496', '910873', '002', 432, 351, to_date('04-04-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105143695', '910873', '002', 432, 351, to_date('04-09-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104176755', '263156', '039', 230, 351, to_date('01-03-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104365552', '910873', '002', 432, 351, to_date('04-09-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104646837', '263156', '039', 230, 351, to_date('01-06-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104763596', '910873', '002', 432, 351, to_date('04-10-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104936656', '263156', '', 15, 247, null); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105510930', '263156', '039', 230, 351, to_date('01-08-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104302780', '263156', '039', 230, 351, to_date('01-07-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104793590', '263156', '039', 230, 351, to_date('01-11-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104238583', '910873', '002', 432, 351, to_date('04-05-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105779115', '263156', '011', 230, 351, to_date('01-04-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104394481', '263156', '039', 230, 351, to_date('01-10-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105144934', '263156', '039', 230, 351, to_date('01-09-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105342823', '263156', '039', 230, 351, to_date('01-03-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105747780', '910873', '002', 432, 351, to_date('04-03-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105517258', '910873', '002', 432, 351, to_date('04-08-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105617909', '910873', '002', 432, 351, to_date('04-11-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104480711', '910873', '002', 432, 351, to_date('04-01-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105845480', '910873', '002', 432, 351, to_date('04-06-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105349031', '910873', '002', 432, 351, to_date('04-03-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105382599', '263156', '039', 230, 351, to_date('01-04-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104423263', '263156', '039', 230, 351, to_date('01-11-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104482370', '263156', '039', 230, 351, to_date('01-01-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104892872', '910873', '002', 432, 351, to_date('04-02-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105071771', '263156', '039', 230, 351, to_date('01-07-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105716829', '910873', '002', 432, 351, to_date('04-02-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105251149', '910873', '002', 432, 351, to_date('04-12-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105420465', '910873', '002', 432, 351, to_date('04-05-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105547036', '910873', '002', 432, 351, to_date('04-09-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105450806', '263156', '039', 230, 351, to_date('01-06-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105178143', '263156', '039', 230, 351, to_date('01-10-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105648407', '910873', '002', 432, 351, to_date('04-12-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105718070', '263156', '011', 230, 351, to_date('01-02-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104735083', '910873', '002', 432, 351, to_date('04-09-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105748707', '263156', '011', 230, 351, to_date('01-03-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104570555', '263156', '039', 230, 351, to_date('01-04-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105480249', '910873', '002', 432, 351, to_date('04-07-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104799512', '910873', '002', 432, 351, to_date('04-11-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105036878', '910873', '002', 432, 351, to_date('04-06-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105413781', '263156', '039', 230, 351, to_date('01-05-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105548204', '263156', '039', 230, 351, to_date('01-09-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104510445', '910873', '002', 432, 351, to_date('04-02-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104545120', '263156', '039', 230, 351, to_date('01-03-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104700608', '263156', '039', 230, 351, to_date('01-08-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104765006', '263156', '039', 230, 351, to_date('01-10-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105111984', '910873', '002', 432, 351, to_date('04-08-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105310993', '263156', '039', 230, 351, to_date('01-02-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105481415', '263156', '039', 230, 351, to_date('01-07-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105210719', '263156', '039', 230, 351, to_date('01-11-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105809981', '263156', '011', 230, 351, to_date('01-05-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104328833', '910873', '002', 432, 351, to_date('04-08-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104511904', '263156', '039', 230, 351, to_date('01-02-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105278905', '910873', '002', 432, 351, to_date('04-01-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104421567', '910873', '002', 432, 351, to_date('04-11-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104851866', '263156', '039', 230, 351, to_date('01-01-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105649424', '263156', '039', 230, 351, to_date('01-12-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104729022', '263156', '039', 230, 351, to_date('01-09-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105070358', '910873', '002', 432, 351, to_date('04-07-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104299829', '910873', '002', 432, 351, to_date('04-07-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104920099', '263156', '039', 230, 351, to_date('01-03-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104266551', '910873', '002', 432, 351, to_date('04-06-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104994904', '910873', '002', 432, 351, to_date('04-05-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104910999', '263156', '', 15, 247, null); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104241418', '263156', '039', 230, 351, to_date('01-05-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104960203', '263156', '039', 230, 351, to_date('01-04-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105381371', '910873', '002', 432, 351, to_date('04-04-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104542458', '910873', '002', 432, 351, to_date('04-03-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104670160', '910873', '002', 432, 351, to_date('04-07-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105105026', '263156', '039', 230, 351, to_date('01-08-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104392347', '910873', '002', 432, 351, to_date('04-10-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104451005', '910873', '002', 432, 351, to_date('04-12-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104453960', '263156', '039', 230, 351, to_date('01-12-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104671563', '263156', '039', 230, 351, to_date('01-07-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104331181', '263156', '039', 230, 351, to_date('01-08-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105580192', '263156', '039', 230, 351, to_date('01-10-2010', 'dd-mm-yyyy'));
I want to remove the lines that are extracted from my select statement. What is the best way to achieve this?SELECT Trx_No, Item_Code, Amount, Item_Id, MAX(Invoice_Dt) FROM Bills GROUP BY Trx_No, Item_Code, Amount, Item_Id
SELECT query sets.She literally takes
delete from bills where (Trx_No,Item_Code,Amount,Item_Id,Invoice_Dt) in (select Trx_No,Item_Code,Amount,Item_Id,MAX(Invoice_Dt) FROM Bills GROUP BY Trx_No,Item_Code,Amount,Item_Id )
Concerning
Etbin
-
How to display records from the xml file
Hi all
I created a region his area of research in reality
with 5 elements and array of result area
I want to search records based on the 5 elements and want to view output table
I have the table name as hr_api_transactions, which contains many columns
and also, this table contains a column
name TRANSACTION_DOCUMENT of type CLOB()
that files xml columns for each record
I want to extract data from this xml file and want to display.Instance of the view - put the name of VO with which you are extracting data
Discover the attribute and the attribute of file View - could see attribute by which you found the content of the file
File name substitution - is not mandatory, let him
The MIME type of the file: do not place anything, need to better manage programmatically through. Put the code in the below processRequest() method
OADataBoundValueViewObject contentBoundValue = new OADataBoundValueViewObject(downloadBean, "FileContentType"); // here "downloadBean" is bean of message Download item downloadBean.setAttributeValue(FILE_CONTENT_TYPE, contentBoundValue);
-Anand
-
Can you record for an object of TYPE input COLLECTION and use it as a table?
My PL/SQL stored procedure creates a list of employee number and phone record numbers. I don't want to store them in a table. I will pass this list from one procedure to another in my package.
I created the type (folder) and type of collection (table) using this statement.
Thing is, can I use the obj_emp_phone_recs_table 'table type' as an array?CREATE TYPE obj_emp_phone_rec AS OBJECT ( emp_number NUMBER, emp_phone VARCHAR2(100) ) / CREATE TYPE obj_emp_phone_recs_table AS TABLE OF obj_emp_phone_rec /
I.e. can I insert records that in the procedure of package and pass reference to him in called secondary procedures.
that is something like that
If yes how to insert the obj_emp_phone_recs_table?PACKAGE BODY abc IS PROCEDURE kdkddk IS BEGIN -- Insert records to the obj_emp_phone_recs_table obj_emp_phone_recs_table(1).emp_number := '1'; obj_emp_phone_recs_table(1).emp_phone := '0774949494'; obj_emp_phone_recs_table(2).emp_number := '234'; obj_emp_phone_recs_table(2).emp_phone := '285494'; -- Pass the table to the sub procedure xyx(obj_emp_phone_recs_table); ........ ...... END kdkddk; END abc;
Nothing on the net. In the Net I found only where u set normal column of a table as an object type and then insert records him.
Any help would be greatly appreciated.
Published by: user12240205 on October 6, 2011 02:08mhouri > drop type obj_emp_phone_recs_table; Type dropped. mhouri > drop type obj_emp_phone_rec ; Type dropped. mhouri > CREATE TYPE obj_emp_phone_rec AS OBJECT 2 ( 3 emp_number NUMBER, 4 emp_phone VARCHAR2(100) 5 ) 6 / Type created. mhouri > CREATE TYPE obj_emp_phone_recs_table AS TABLE OF obj_emp_phone_rec 2 / Type created. mhouri > create or replace procedure p1(pin_tab IN obj_emp_phone_recs_table) 2 is 3 begin 4 for j in 1..pin_tab.count 5 loop 6 dbms_output.put_line('record number '||j ||'-- emp number --'||pin_tab(j).emp_number); 7 end loop; 8 9 end p1; 10 / Procedure created. mhouri > create or replace procedure p2 2 is 3 lin_tab obj_emp_phone_recs_table := obj_emp_phone_recs_table(); 4 begin 5 FOR i IN 1 .. 5 6 LOOP 7 lin_tab.extend; 8 lin_tab(i) := obj_emp_phone_rec(i, 'i-i-i'); 9 END LOOP; 10 11 p1(lin_tab); 12 13 end p2; 14 / Procedure created. mhouri > set serveroutput on mhouri > exec p2 record number 1-- emp number -- 1 record number 2-- emp number --2 record number 3-- emp number --3 record number 4-- emp number --4 record number 5-- emp number --5 PL/SQL procedure successfully completed.
Best regards
Mohamed Houri
Maybe you are looking for
-
How do I disassemble the printer so I can work on it properly without breaking?
Need to disassemble the chassis work printer without damaging it. Is there any diagram that I can look if I'll be able to do this with damage them the machine?
-
Need help with timers...
I'm building a building, a machine that uses vibrating motors smallish. In order to overcome the inertia, when they are still, higher voltage must be applied that should be run at low speed. If the applied voltage is low and the engines are not runni
-
I have this BroadJump Client Foundation on my hard drive, what do I do? Should I get rid of him? How can I get rid of him? It's an old computer that runs very slowly. Removing it would help?
-
Valet - NAT or SPI service?
The Cisco Valet/Valet Plus there technology of network address translation (NAT) or a firewall SPI? (Or both?) Thank you.
-
I have a HP Pavilion with Vista Net. All of a sudden I lost my sidebar gadgets. Even when I click on the right button of the mouse there is no sign of gadgets. How can I get them back?