473,626 Members | 3,041 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

xml input into temp table.

I have this stored procedure that takes some xml as input. What I need
to is use xml as a table so that I can join other tables to the xml
and get information back that matches the criteria.

I can use dxxshredxml to put it into a regular table and everything
works great. but when I try to put it into a temp table it doesn't
work. I get an error saying Session.ACCESSM ASK doesn't have a column
name ACCESS_MASK_ID.

Do I have to use a temp table ? or is there some way I can make joins
to the xml directly ?

Thanks in advance.

Here is the my test procedure:

CREATE PROCEDURE WEBADM.ACCESS_M ASK ( IN xmlDoc CLOB(1M) )
DYNAMIC RESULT SETS 1
------------------------------------------------------------------------
-- SQL Stored Procedure
-- xmlDoc access masks list
------------------------------------------------------------------------
P1: BEGIN
declare dadDoc clob(1M);
declare retCode integer;
declare retMsg varchar(1000);

DECLARE GLOBAL TEMPORARY TABLE SESSION.ACCESS_ MASK (
ACCESS_MASK_ID INTEGER,
DLR_CD VARCHAR(5),
RGN_CD VARCHAR(5),
BRN_CD VARCHAR(5),
REP_CD VARCHAR(5)
)
ON COMMIT PRESERVE ROWS;

-- get Dad file
call WEBADM.DWM_GET_ DAD_FILE('ACCES S_MASK',dadDoc) ;

-- parse xml into database
call DB2XML.DXXSHRED XML(dadDoc, xmlDoc, retCode,retMsg) ;

drop table SESSION.ACCESS_ MASK;
END P1

here is the DAD:

<?xml version="1.0"?>
<!DOCTYPE DAD SYSTEM "/opt/IBM/db2/V8.1/db2xml/dtd/dad.dtd">
<DAD>
<validation>N O</validation>
<Xcollection>
<prolog>?xml version="1.0"?</prolog>
<root_node>
<element_node name="ACCESSMAS KS">
<element_node name="ACCESSMAS K">
<RDB_node>
<table name="SESSION.A CCESS_MASK" key="ACCESS_MAS K_ID"/>
</RDB_node>
<attribute_no de name="ACCESS_MA SK_ID">
<RDB_node>
<table name="SESSION.A CCESS_MASK"/>
<column name="ACCESS_MA SK_ID" type="integer"/>
</RDB_node>
</attribute_node>
<attribute_no de name="DLR_CD">
<RDB_node>
<table name="SESSION.A CCESS_MASK"/>
<column name="DLR_CD" type="varchar(5 )"/>
</RDB_node>
</attribute_node>
<attribute_no de name="RGN_CD">
<RDB_node>
<table name="SESSION.A CCESS_MASK"/>
<column name="RGN_CD" type="varchar(5 )"/>
</RDB_node>
</attribute_node>
<attribute_no de name="BRN_CD">
<RDB_node>
<table name="SESSION.A CCESS_MASK"/>
<column name="BRN_CD" type="varchar(5 )"/>
</RDB_node>
</attribute_node>
<attribute_no de name="REP_CD">
<RDB_node>
<table name="SESSION.A CCESS_MASK"/>
<column name="REP_CD" type="varchar(5 )"/>
</RDB_node>
</attribute_node>
</element_node>
</element_node>
</root_node>
</Xcollection>
</DAD>
Nov 12 '05 #1
0 1644

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
11424
by: Jerry LeVan | last post by:
Hi, I am adding image and large object support in my Cocoa postgresql browser. Are there going to be any enhanced bytea support functions coming along? It seems sorta silly to have to write customized C code to import a file into a bytea field.
7
3383
by: serge | last post by:
How can I run a single SP by asking multiple sales question either by using the logical operator AND for all the questions; or using the logical operator OR for all the questions. So it's always either AND or OR but never mixed together. We can use Northwind database for my question, it is very similar to the structure of the problem on the database I am working on. IF(SELECT OBJECT_ID('REPORT')) IS NOT NULL DROP TABLE REPORT_SELECTION
2
2041
by: adambossy | last post by:
I have a nasty situation in SQL Server 7.0. I have a table, in which one column contains a string-delimited list of IDs pointing to another table, called "Ratings" (Ratings is small, containing less than ten values, but is subject to change.) For example: 1/Bronze 2/Silver 3/Gold 4/Platinum
44
9458
by: Kulgan | last post by:
Hi I am struggling to find definitive information on how IE 5.5, 6 and 7 handle character input (I am happy with the display of text). I have two main questions: 1. Does IE automaticall convert text input in HTML forms from the
4
4107
hirak1984
by: hirak1984 | last post by:
Dear Sir/mam, I am new comers for DB2 .I Write a Stored Procedure below in line CREATE PROCEDURE AUS.PROCEDURE1 ( IN var0 VarCHAR(4000), OUT var1 CHAR(6) ) DYNAMIC RESULT SETS 1 ------------------------------------------------------------------------ -- SQL Stored Procedure -- var0
0
1229
hirak1984
by: hirak1984 | last post by:
Dear Sir/mam, I am new comers for DB2 .I Write a Stored Procedure below in line CREATE PROCEDURE AUS.PROCEDURE1 ( IN var0 VarCHAR(4000), OUT var1 CHAR(6) ) DYNAMIC RESULT SETS 1 ------------------------------------------------------------------------ -- SQL Stored Procedure -- var0
5
1401
by: theflyingminstrel | last post by:
Hi I have a question, it's probably very basic but I'm still learning the Javascript basics. The following form outputs a string change (from "input" to "text" box ). When the word "test" is inputted, it changes to "good". Simple question: If there is no matching string, how would I get the form to just display nothing at all? Thanks! <html>
9
3966
by: seep | last post by:
hi i m finding following error on the code that i wants to use to get all record from table via store procedure with paging. the error is : Input string was not in a correct format. after a hectic struggle still i dont know 1--who can i solve it and 2--where should i have to place the function GETDATA . who is it possible to keep all the functions in a separate file and to call that file in required page. here is the...
23
1953
by: angelicdevil | last post by:
wat i m trying to do is delete a line from the xml based on the line generated i.e $mybody dynamically from the values entered by the user. in the code i provide...it simply adds a line </gallery> belowe the existing line of </gallery> and the line echoing $temp and $arr do not display it shows a icon similar broken page. just run the code n u will understand wat i m saying. <?php $myheading=""; $mylink=""; $mybody="";
0
8259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8192
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7188
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6119
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.