Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help - how to select data from table

Status
Not open for further replies.

john9

Programmer
May 31, 2002
16
0
0
US
Need to understand if the SQL code I created shown below is correct.

A Java application is calling a Oracle 9i stored procedure to retrieve existing XML documents stored in a table.

The Java application will send key fields (named: NODEID, DOCTYPE, and DOCREF). I will then used these fields to select a desired table entry. Once the match is made I then select my XML document column (named: XMLDOC) and send it back to the calling JAVA application.

I would appreciate it if someone can give me some direction if this code looks correct.

Thank You.
-----------------------------------------------------
CREATE OR REPLACE PROCEDURE PRISM.Sp_Ins_Xmldoc(NODEID IN VARCHAR2, DOCTYPE IN VARCHAR2, DOCREF IN VARCHAR2,
xmldata OUT SYS.XMLTYPE)

AS
BEGIN

select XMLDOC from NODALXML X
where X.nodeid = nodeid
and X.doctype = doctype
and X.docref = docref

into xmldata
 
John,

It is close. Following the "BEGIN", your code should read:
Code:
...
select XMLDOC [b]into xmldata[/b] from NODALXML X 
where X.nodeid = nodeid
and X.doctype = doctype
and X.docref = docref;
end;
/

[santa]Mufasa
(aka Dave of Sandy, Utah, USA @ 06:44 (02Sep04) UTC (aka "GMT" and "Zulu"), 23:44 (01Sep04) Mountain Time)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top