Value retrieve from PL/SQL Table
Hi all,
I am using PL/SQL Table to store the data. In table type p_table which I declared in a Package PCK.
I am storing the value as follows
pck.p_table(p_count)
Here p_count is the counter.
Values are storing the tables. Like
Counter Values
1 1
2 2
3 1.
But when I retrieved the values from the table like pck.p_table(p_counter_1).
Then for first Counter its giving me 0 value instead of 1.
Can you please tell me why this is happening.
Thanks in advance.
Ok,here is the code.
if(nvl(values1,0) >= nvl(:cf_qty,0)) then
return (nvl(value1,0)-nvl(value2,0));
else
pck.p_count_first := pck.p_count_first + 1 ;
pck.p_FGI(pck.p_count_first):= nvl(value2,0) - nvl(value1,0);
end if;
Here for First counter value stored as 1,
Second value stored as 1.
When I am retriving the values. like
if (pck.p_FGI.count > 0) then
PCK.p_count_second := pck.p_count_second + 1 ;
v_total := pck.p_FGI(pck.p_count_second) VALUE3;
end if;
Here Value pck.p_FGI(pck.p_count_second) comes as 0 instead of 1.
Can you tell us why is this show value 0.
Similar Messages
-
How to retrieve the values from PL/SQL table types.
Hi Every one,
I have the following procedure:
DECLARE
TYPE t1 IS TABLE OF emp%ROWTYPE
INDEX BY BINARY_INTEGER;
t t1;
BEGIN
SELECT *
BULK COLLECT INTO t
FROM emp;
END;
This procedure works perfectly fine to store the rows of employee in a table type. I am not able to retrieve the values from Pl/SQL table and display it using dbms_output.put_line command.
Can anybody help me please!!!!!
Thanks
Ahmed.You mean, you can't add this
for i in t.first..t.last loop
dbms_output.put_line(t(i).empno||' '||t(i).ename||' '||t(i).job);
end loop;or you can't add this
set serveroutput onor maybe, you are working in third party application where dbms_output is not applicable at all?
You see, not able like very similar it is not working - both are too vague...
Best regards
Maxim -
Hi Friends,
I am using Oracle 8.1.6 Server, & facing problems while retrieving data from a PL/SQL Table:
CREATE or REPLACE PROCEDURE test_proc IS
TYPE tP2 is TABLE of varchar2(10); --declared a collection
dt2 tP2 := tP2('a','b','c');
i NUMBER(8);
begin
SELECT COUNT(*) INTO i FROM TABLE(CAST(dt2 as tP2));
DBMS_OUTPUT.PUT_LINE('**'||i);
end;
While executing the above procedure, I encountered foll. error:
ERROR at line 1:
ORA-00600: internal error code, arguments: [15419], [severe error during PL/SQL execution], [], [],
ORA-06544: PL/SQL: internal error, arguments: [pfrrun.c:pfrbnd1()], [], [], [], [], [], [], []
ORA-06553: PLS-801: internal error [0]
Can anyone please help me, where the problem is??
Is it Possible to retrieve data from PL/SQL TABLE using SELECT statement? & How ?
Thanks in advance.
Best Regards,
Jay Raval.Thanks Roger for the Update.
It means that have to first CREATE TYPE .. TABLE in database then only I can fire a Select statement on that TYPE.
Actually I wanted to fire a Select statement on the TABLE TYPE, defined & declared in PLSQL stored procedure using DECLARE TYPE .. TABLE & not using CREATE TYPE .. TABLE.
I was eager to know this, because my organization is reluctant in using CREATE TYPE .. TABLE defined in the database, so I was looking out for another alternative to access PL/SQL TABLE using Select statement without defining it database. It would have been good if I could access a PLSQL TABLE using Select statement Declared locally in the stored procedure.
Can I summarize that to access a PL/SQL TABLE using SELECT statement, I have to first CREATE TYPE .. TABLE?
If someone have any other idea on this, please do let me know.
Thanks a lot for all help.
Best Regards,
Jay Raval.
You have to define a database type...
create type tP2 is table of varchar2(10)
CREATE OR REPLACE PROCEDURE TEST_PROC
IS
dt2 tP2 := tP2('a','b','c');
i NUMBER(8);
begin
SELECT COUNT(*) INTO i FROM TABLE(CAST (dt2 AS tP2));
DBMS_OUTPUT.PUT_LINE('**'||i);
end;
This will work.
Roger -
Thanks for answer to my first question. Now I have another problem.
Is there any way to print a report based on virtual table, which is created during some Pl/SQL procedure and can't be easily decribed by Select statementSELECT FROM PL/SQL TABLE IN ORACLE REPORTS 6I
The requirement is to populate a table and then select from that table in a report. The typical solution is to
populate a database table, but for situations where that is undesirable there is a way to select from a PL/SQL
table.
For example - for each employee we want to populate a PL/SQL table and then select from that table.
I used the following records in the emp table:
INSERT INTO Emp VALUES(123,'Bob','Sales',555,'28-JAN-79',35000,12,30);
INSERT INTO Emp VALUES(321,'Sue','Finance',555,'12-MAY-83',42000,12,10);
INSERT INTO Emp VALUES(234,'Mary','Account',555,'14-AUG-82',33000,12,20);
INSERT INTO Emp VALUES(623,'Joe','Sales',555,'28-JAN-79',35000,12,30);
INSERT INTO Emp VALUES(621,'Jim','Finance',555,'12-MAY-83',42000,12,10);
INSERT INTO Emp VALUES(634,'Jane','Account',555,'14-AUG-82',33000,12,20);
INSERT INTO Emp VALUES(723,'Fred','Sales',555,'28-JAN-79',35000,12,30);
INSERT INTO Emp VALUES(721,'Meg','Finance',555,'12-MAY-83',42000,12,10);
INSERT INTO Emp VALUES(734,'Jill','Account',555,'14-AUG-82',33000,12,20);
=============================================================================================
Step 1: Create a package spec in the report:
PACKAGE pkg_table IS
TYPE t_rec IS RECORD (
field1 NUMBER(6),
field2 VARCHAR2(30));
TYPE t_tab IS TABLE OF t_rec INDEX BY BINARY_INTEGER;
gv_tab t_tab;
FUNCTION populate (
p_empno NUMBER) RETURN NUMBER;
END;
Step 2: Create the package body:
PACKAGE BODY pkg_table IS
FUNCTION populate (
p_empno NUMBER) RETURN NUMBER IS
BEGIN
gv_tab.DELETE;
-- populate table as required - for demo purposes put in anything
FOR lv_ind IN 1..MOD(p_empno,20) LOOP
gv_tab(lv_ind).field1 := lv_ind;
gv_tab(lv_ind).field2 := 'row '||TO_CHAR(lv_ind)||' for emp '||TO_CHAR(p_empno);
END LOOP;
RETURN gv_tab.COUNT;
END populate;
END;
Step 3: Create the master query:
SELECT empno,
ename
FROM emp
Step 4: Add a formula column CF_populate to the master query that does:
function CF_populateFormula return Number is
-- for each emp fetched this formula will repopulate the PL/SQL table
-- and return the number of records in the table
begin
return pkg_table.populate(:empno);
end;
Step 5: Create the detail query:
-- we need to join this to the master and then ensure that for each
-- empno there are as many records fetched as there will be
-- records in the PL/SQL table
SELECT e1.empno,rownum
FROM emp e1, emp e2, emp e3
WHERE rownum <= :CF_populate
Step 6: Add formula columns to the detail query for each of the fields in the
PL/SQL table we want to display:
CF_Field1:
function CF_field1Formula return Number is
begin
return pkg_table.gv_tab(:rownum).field1;
end;
CF_Field2:
function CF_field2Formula return Varchar2 is
begin
return pkg_table.gv_tab(:rownum).field2;
end;
Step 7: Create the repeating frame and layout items to display the formula columns.
=============================================================================================
The same technique can be used to populate a master query. In a report level formula column
CF_Populate populate the PL/SQL table as required. In the master query we just need the rownum:
SELECT rownum
FROM emp, emp, emp
WHERE rownum <= :CF_Populate
Add the formula columns to display Field1 and Field2.
=============================================================================================
Hugh Nelson
26/04/2005 -
Reading Data from a SQL table to a Logical file on R/3 appl. Server
Hi All,
We would like to create Master Data using LSMW (direct Input) with source files from R/3 Application Server.
I have created files in the'/ tmp/' directory however I do not know how to read data from the SQL table and insert it into the logical file on the R/3 application server.
I am new to ABAP , please let me know the steps to be done to acheive this .
Regards
- AjayHi,
You can find lot of information about Datasets in SCN just SEARCH once.
You can check the code snippet for understanding
DATA:
BEGIN OF fs,
carrid TYPE s_carr_id,
connid TYPE s_conn_id,
END OF fs.
DATA:
itab LIKE
TABLE OF fs,
w_file TYPE char255 VALUE 'FILE',
w_file2 TYPE char255 VALUE 'FILE2'.
SELECT carrid connid FROM spfli INTO TABLE itab.
OPEN DATASET w_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT. "Opening a file in Application
" Server to write data
LOOP AT itab INTO fs.
TRANSFER fs TO w_file. "" Writing the data into the Application server file
ENDLOOP.
CLOSE DATASET w_file.
OPEN DATASET w_file FOR INPUT IN TEXT MODE ENCODING DEFAULT. "Opening a file in Application
" server to read data
FREE itab.
DO.
READ DATASET w_file INTO fs.
IF sy-subrc EQ 0.
APPEND fs TO itab.
OPEN DATASET w_file2 FOR APPENDING IN TEXT MODE ENCODING DEFAULT. "Appending more data to the file in the
" application server
TRANSFER fs TO w_file2.
CLOSE DATASET w_file2.
ELSE.
EXIT.
ENDIF.
ENDDO.
Regards
Sarves -
ADF Report output from PL\SQL Table
Hi,
I am some complex calcualtions in the report and the report has a fixed number of columns and reports. Is there any way i can do all the programming in pl\sql and call this procedure/package from ADF and return the pl\sql table type?
Can i create a VO from pl\sql table?
Thanks,
Lakshmi.On Database
create or replace type empRow as object (
Employee_ID Number,
First_Name Varchar2(20),
Last_name Varchar2(25)
create or replace type empTable as table of empRow;
create or replace function getEmployees
(aDepartmentID Number)
return empTable
PIPELINED
as
begin
for rec in (select Employee_ID, First_Name, Last_name
from employees
where Department_ID = aDepartmentID) loop
pipe row(new empRow(rec.Employee_ID, rec.First_Name, rec.Last_name));
end loop;
return;
end;
THEN create a VO based on this Query below:
select * from table(getEmployees(:deptid)
and you are ready to Go. -
Logic for inserting values from Pl/sql table
Hi I'm using Forms 6i and db 10.2.0.1.0
I am reading an xml file using text_io, and extracting the contents to Pl/sql table.
Suppose, the xml
<?xml version="1.0" encoding="UTF-8" ?>
<XML>
<File name="S2_240463.201002170044.Z">
<BookingEnvelope>
<SenderID>KNPROD</SenderID>
<ReceiverID>NVOCC</ReceiverID>
<Password>TradingPartners</Password>
</BookingEnvelope>
</File>
</XML>From this xml, i'm extracting contents to a table of records, say bk_arr, which look like
Tag Val
File name S2_240463.201002170044.Z
SenderID KNPROD
ReceiverID NVOCC
Password TradingPartnersAnd now from this i've to insert into table, say bk_det .
The tag may come in different order, sometimes some additional tags may also come in between,
So i cannot access it sequentially and insert like
Insert into bk_det(file,sndr,rcvr,pswd) values(bk_arr(1).val,bk_arr(2).val....)
The tag name is constant ir for sender id, it will always be SenderID , not something like sndrid or sndid etc..
So if i've to insert to senderid column, then i've to match the tag = SenderID, and take the value at that index in the array.
How best i can do this?
ThanksI am referring to how you are parsing the XML - as you can extract values from the XML by element name. And as the name is known, it's associated value can be inserted easily.
Basic example:
SQL> with XML_DATA as(
2 select
3 xmltype(
4 '<?xml version="1.0" encoding="UTF-8" ?>
5 <XML>
6 <File name="S2_240463.201002170044.Z">
7 <BookingEnvelope>
8 <SenderID>KNPROD</SenderID>
9 <ReceiverID>NVOCC</ReceiverID>
10 <Password>TradingPartners</Password>
11 </BookingEnvelope>
12 </File>
13 </XML>' ) as XML_DOM
14 from dual
15 )
16 select
17 extractValue( xml_dom, '/XML/File/@name' ) as FILENAME,
18 extractValue( xml_dom, '/XML/File/BookingEnvelope/SenderID' ) as SENDER_ID,
19 extractValue( xml_dom, '/XML/File/BookingEnvelope/ReceiverID' ) as RECEIVER_ID,
20 extractValue( xml_dom, '/XML/File/BookingEnvelope/Password' ) as PASSWORD
21 from xml_data
22 /
FILENAME SENDER_ID RECEIVER_I PASSWORD
S2_240463.201002170044.Z KNPROD NVOCC TradingPartners
SQL> Now this approach can be used as follows:
create or replace procedure AddFile( xml varchar2 ) is
begin
insert into foo_files(
filename,
sender_id,
receiver_id,
password
with XML_DATA as(
select
xmltype( xml ) as XML_DOM
from dual
select
extractValue( xml_dom, '/XML/File/@name' ),
extractValue( xml_dom, '/XML/File/BookingEnvelope/SenderID' ),
extractValue( xml_dom, '/XML/File/BookingEnvelope/ReceiverID' ),
extractValue( xml_dom, '/XML/File/BookingEnvelope/Password' )
from xml_data;
end;
/No need for a fantasy called PL/SQL "+tables+". -
How to fetch the data from pl/sql table dynamically
Hi All, I have the requirement of comparing two db views data in pl/sql. So, I have bulk collect the view into pl/sql table. But, the issue is, It is expecting to provide the column name for comparison. But, in my case, column name is dynamic. So, i cannot provide the column name directly for comparison.
For eg: In my view t1_VW, i have 4 columns. stid, c1,c2,c3,c4 and similar structure for t2_vw
my code
TYPE v1_type IS TABLE OF t1_vw%ROWTYPE;
l_data v1_type;
TYPE v1_type1 IS TABLE OF t2_vw%ROWTYPE;
l_data1 v1_type1;
test varchar2(1000);
test1 varchar2(1000);
temp1 number;
begin
SELECT * Bulk collect into l_data
FROM T1_VW;
SELECT * Bulk collect into l_data1
FROM T2_VW;
select l_data(1).stid into temp1 from dual; -- It is working fine and gives me the value properly
-- But, in my case, we are reading the column names from array, i am constructing the query dynamically and execute it.
test :='select l_data(1).stid into temp1 from dual';
execute immediate test into temp1;
-- I am getting error as follows:
Error report:
ORA-00904: "L_DATA": invalid identifier
ORA-06512: at "SYSTEM.BULKCOMPARISON", line 93
ORA-06512: at line 2
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action
end;
- Please help me to get rid of this issue. Is it possible to construct the query dynamically and fetch the data?. If not, is there any other better approach to compare the data between two views?.Output should display what are all columns changed and its old value and new value.
For eg., output should be
COLUMNNAME OLD_VALUE NEW_VALUE STID
C1 20 10 1
C2 50 40 2
C3 60 70 2
C2 80 90 3Why no do this only via a simple sql ?
create table a (STID number, C1 number, C2 number, C3 number);
insert into a values (1, 20, 30, 40)
insert into a values (2, 40, 50, 60);
insert into a values (3, 90, 80, 100);
create table b as select *
from a where 1 = 0;
insert into b values (1, 10, 30, 40)
insert into b values (2, 40, 40, 70);
insert into b values (3, 90, 90, 100);
commit;And now you can issue such a kind of select
SELECT stid , c1, c2, c3
FROM
( SELECT a.*,
1 src1,
to_number(null) src2
FROM a
UNION ALL
SELECT b.*,
to_number(null) src1,
2 src2
FROM b
GROUP BY stid , c1, c2, c3
HAVING count(src1) <> count(src2)
order by stid;I would then create a new table a_b_difference having the same structure as a or b and insert into it like this
create table a_b_diff as select * from a where 1 = 0;
insert into a_b_diff
SELECT stid , c1, c2, c3
FROM
( SELECT a.*,
1 src1,
to_number(null) src2
FROM a
UNION ALL
SELECT b.*,
to_number(null) src1,
2 src2
FROM b
GROUP BY stid , c1, c2, c3
HAVING count(src1) <> count(src2)
order by stid
;Then each time there is a difference between a column in a and its equivalente one in b (per unique stid ) a record will be inserted in this table.
You can do more by adding the name of the table in front of each record in this table to see exactly where the data comes from
Best Regards
Mohamed Houri -
Ref Cursor from PL/SQL Table
I'm building a complex report in which the information cames from a lot of tables and needs complex formatting. I'd like to base my report in a table returned by a stored procedure (like you can do in Forms). Is there any way to convert an PL/SQL table in a Ref Cursor?
Why don't you process the data in procedure and dump into temporary table. And base your report on that temporary table.
it may simplify your report.
Atul -
Formating numbers in a form after retrieving from an SQL database
Hello everyone,
I am using php to populate a form using numbers taken from an sql database. I am having a hard time showing decimal places in those numbers. The code I am using in the value section of the form is:
value="<?php if (isset($_POST['unit_price_1'])) {
echo htmlentities( $_POST['unit_price_1'], ENT_COMPAT, 'UTF-8');
} else {
echo htmlentities($row_getInvoice['unit_price_1'], ENT_COMPAT, 'UTF-8');
} ?>" />
This code rounds all numbers up and eliminates decimal places. I am trying to show dollars and cents.
How do I alter the code to accomplish what I want.
JeffNot sure what might come in your way here, so I just made the following simple test by using a static value rather than one which gets derived from a recordset (the source shouldn´t matter), and this works well for me without seeing the value altered in any way:
<?php
$value = "10.22";
?>
<input type="text" name="whatever" value="<?php echo htmlentities($value, ENT_COMPAT, 'UTF-8'); ?>" />
However,. for displaying numeric values you really don´t need to use htmlentities/ENT_COMPAT etc etc -- that´s something you´d rather use for displaying textual contents containg special characters like umlauts and such.
If all you need is to add some degree of protection by escaping special HTML characters (<, >, &, etc.), the function htmlspecialchars() will only be escaping just these characters and leave the rest "as is", whereas htmlentities() is notably more rigi, because this function will convert all applicable characters to HTML entities -- but again: at this point you´re just *displaying* some numeric value, that is, such security measures are pretty much pointless in this scenario, because there´s nothing to protect from ;-)
Please test what happens when doing away with the htmlentities - thing.
Cheers,
Günter -
How to remove duplicates from PL-SQL table?
Hi Gurus,
I have a PL-SQL table with following structure
Authors (SR_NO, Auth_Code, Change_Date, Cost)
This tables is being populated using a cursor. But, this table may have some duplicate rows (for Auth_Code column)
e.g
SR_NO Auth_Code Change_Date Cost
1 A1 14-FEB-09 08.18.47 AM 11.00
2 A2 14-FEB-09 08.18.56 AM 2839.00
3 A1 15-FEB-09 08.00.02 AM 1299.00
4 A1 15-FEB-09 07.00.00 AM 789.00
5 A3 14-FEB-09 08.18.56 AM 312.00
6 A4 14-FEB-09 08.19.02 AM 233.00Out of the above result set I need to select the distinct Auth_Code rows for which the Change_Date is maximum (and store it into some other PL-SQL table for further processing or even deleting from this table itself will also do!)
i.e. Out of above data A1 is duplicated and has maximum Change_Date = 15-FEB-09 08.00.02 AM.
Hence my resultant PL-SQL Table should have below data
SR_NO Auth_Code Change_Date Cost
2 A2 14-FEB-09 08.18.56 AM 2839.00
3 A1 15-FEB-09 08.00.02 AM 1299.00
5 A3 14-FEB-09 08.18.56 AM 312.00
6 A4 14-FEB-09 08.19.02 AM 233.00I am not that much aware of PL-SQL tables and there is no any chance of modifying the existing cursor which populates the data into this PL-SQL table.
I guess this I need to compare each record of PL-SQL table with others, but not sure how to do that.
Could you please help?HI,
Like this?:
Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
Connected as hr
SQL>
SQL> with data as(
2 select 1 as SR_NO, 'A1' as Auth_Code, to_date('14-FEB-09 08.18.47', 'dd-mon-yy hh24:mi:ss') as change_date, 11.00 as cost from dual union all
3 select 2 as SR_NO, 'A2' as Auth_Code, to_date('14-FEB-09 08.18.56', 'dd-mon-yy hh24:mi:ss') as change_date, 2839.00 as cost from dual union all
4 select 3 as SR_NO, 'A1' as Auth_Code, to_date('15-FEB-09 08.00.02', 'dd-mon-yy hh24:mi:ss') as change_date, 1299.00 as cost from dual union all
5 select 4 as SR_NO, 'A1' as Auth_Code, to_date('15-FEB-09 07.00.00', 'dd-mon-yy hh24:mi:ss') as change_date, 789.00 as cost from dual union all
6 select 5 as SR_NO, 'A3' as Auth_Code, to_date('14-FEB-09 08.18.56', 'dd-mon-yy hh24:mi:ss') as change_date, 312.00 as cost from dual union all
7 select 6 as SR_NO, 'A4' as Auth_Code, to_date('14-FEB-09 08.19.02', 'dd-mon-yy hh24:mi:ss') as change_date, 233.00 as cost from dual)
8 select * from data d where change_date = (select max(change_date) from data d2 where d.auth_code = d2.auth_code);
SR_NO AUTH_CODE CHANGE_DATE COST
2 A2 14/02/2009 2839
3 A1 15/02/2009 1299
5 A3 14/02/2009 312
6 A4 14/02/2009 233
SQL>Regards, -
Field value retrieve from sql query
Hi,
Is there any way to code sql query into form field in rtf template ?.
I have converted an oracle report to BI publisher (e-business suite R12) but I have a form field that contain a sql query that retrieve a value from database. I don't know how to code sql query in form field in rtf template.
Thanks for help,http://winrichman.blogspot.com/search/label/cross%20tab
http://winrichman.blogspot.com/search/label/Cross-tab
http://winrichman.blogspot.com/search/label/Dynamic%20column -
How to create a bc model for sharepoint 2013 that consume data from two Sql tables?
Hi everyone!!!
I have created several external contents using SQL Server databases as datasource. The thing is every time I created one, only consume one table and define operations for that table. I would need to create an external content that can contain the
information of two tables. I tried to export the bdc model and type the query using left joins but nothing happens...I did it in that way for sharepoint 2007 and works!!!
I know if a create a view in the database I can have the data that I want and I can create the external content using the view. But the thing is I don't have access to the database for creating anything, just read it.
can anybody can help me, please?
Thanks.Please follow this article to write SSRS reports with data source as SharePoint list/calendars etc. All document libraries, list and calendars are derived from base list class so you can use any of this type as a data source
http://www.mssqltips.com/sqlservertip/2068/using-a-sharepoint-list-as-a-data-source-in-sql-server-reporting-services-2008-r2/
Once your SSRS report is developed, you have multiple ways to show it in SharePoint
- upload to SSRS server and show in sharepoint in a page viewer web part or simply open it as a link in new window
- configure SharePoint environment with integration to SSRS and upload report to SharePoint library. Display report in a web part page using SSRS web part.
Moonis Tahir MVP SharePoint,MCTS SharePoint 2010/2007, MCPD.net, MCSD.net, MCTS BizTalk 2006,SQL 2005 -
Creating an XML file from multiple sql tables
I have very little xml experience, but need to generate an xml file from multiple table. I know what the output needs to look like, but do not know how to setup the code. Any help would be appreciated.
- <Practice SourceID="EPIC" ExternalPracticeID="PPAWB">
- <Provider ExternalProviderID="TB2" FirstName="THOMAS G" LastName="BREWSTER">
- <Patient ExternalPatientID="99999" OldExternalPatID="" FirstName="test" MiddleName="J" LastName="test" Gender="M" DateOfBirth="2005-08-12" SocSecNumber="000-00-0000" LanguageID="22" AddressOne="test" AddressTwo="" City="test" StateID="20" ZipCode="99999" DayPhone="" EveningPhone="207-999-9999" StatusID="">
<Measure MeasureID="2" MeasureValue="5" MeasureDate="2008-10-24 13:43:00" />
<Measure MeasureID="2" MeasureValue="5" MeasureDate="2008-10-24 14:23:00" />
<Measure MeasureID="3" MeasureValue="1" MeasureDate="2008-10-24 13:43:00" />
<Measure MeasureID="3" MeasureValue="1" MeasureDate="2008-10-24 14:23:00" />
<Measure MeasureID="32" MeasureValue="3" MeasureDate="2008-10-24 13:51:00" />
<Measure MeasureID="33" MeasureValue="1" MeasureDate="2008-10-24 13:43:00" />
<Measure MeasureID="33" MeasureValue="1" MeasureDate="2009-02-09 10:09:00" />
<Measure MeasureID="4" MeasureValue="5" MeasureDate="2008-10-24 13:43:00" />
<Measure MeasureID="4" MeasureValue="5" MeasureDate="2008-10-24 14:23:00" />
<Measure MeasureID="40" MeasureValue="2008-10-24 13:43:00" MeasureDate="2008-10-24 13:43:00" />
<Measure MeasureID="40" MeasureValue="2008-10-24 14:23:00" MeasureDate="2008-10-24 14:23:00" />
<Measure MeasureID="41" MeasureValue="2008-10-24 13:43:00" MeasureDate="2008-10-24 13:43:00" />
<Measure MeasureID="41" MeasureValue="2008-10-24 13:51:00" MeasureDate="2008-10-24 13:51:00" />
</Patient>
</Provider>
</Practice>You are interested in XMLElement and probably XMLAgg. Since you didn't list a version, I can't provide links to the corresponding documentation. I cringe at all the attributes on the Patient element as that info should really be elements.
To create the Measure node, your overall SQL statement may look something like (not tested)
SELECT XMLElement....
XMLAgg(SELECT XMLElement
FROM measures_table
WHERE join condition to parent)
FROM patient,
provider,
practice
WHERE join conditionsFor additional help, please include your version (4 digits), some sample data, and what you have tried. -
From pl/sql table getting error - "ORA-01403: no data found"
Hi All,
i habe written package, and the spce define as -
type F761RecType is RECORD (
type F761TabType is TABLE of F761RecType INDEX BY BINARY_INTEGER;
l_F761_table F761TabType;
PROCEDURE modification1
p_F761_table IN F761TabType,
From button click of form i passed -
DECLARE
l_f761_table I743_PUC_MAPS_TREE_PKG.F761TabType;
l_counter number;
BEGIN
LOOP
l_counter :=l_counter+1;
l_f761_table(l_counter).P_TABLE := :MAPS.P_table;
EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE' ;
next_record;
end loop;
i743_puc_maps_tree_pkg.modification1(
p_F761_table => l_f761_table,
END;
Now when I take table count (l_f761_table.count) in button click in form level I am getting value; but when I try to get the count in sid the package, it giving error "ORA-01403: no data found".
Pls tell me where I am wrong ..!!
BR,
SubirThaks all, probls has been solved..
Maybe you are looking for
-
How to load master data with text into infoObject in BI 7.0
Hi all; I have an infoobject 0employee ( this is for employee number ,8 character long), with medium text option. I would like to load Employee name as a text option for employee number. How do I load this mater data into this 0employee object, Pleas
-
I have Mac Book Pro ( bought November 2010) that I want to migrate all of the data and applications from, over to a new Mac Book Air? It was suggested that I use the Migration Tool as it is supposed to make an exact clone of the Mac Book Pro machine
-
Swnconfig exclude outbox workitem
Hi all. I have scheduled the SWNCONFIG to send out approval notification every 10 minutes in my system. However, users might manually approve them from SBWP. After they had approve the document, the workitem moved from INBOX to OUTBOX. Now, how do I
-
How to maintain costs without creating GL account
hi friends, i have a situation here. my company is into construction activity. when they award contracts to contractor the same is done through a tender document which specifies what are works to be carried by him with specifications like internal
-
Available language in the french package of Photoshop Elements 8 for Windows
Please could someone tell me the different language that I can choose during the installation of "Photoshop Element 8 for Windows" ? I want to know if I offer a french package to a person that speak hungarian, could he install it in english ? Thanks.