Prev: MSSQL(Temp Table and sp_executesql) to DB2(problem)
Next: In DB2 UDF , Can I insert Temp table ??(Original Source MSSQL)
From: scv1977 on 28 Apr 2010 02:51 Hi I have the following build problem with CODE executing the following. The simplified code does the following(SQL16012N) The Sample code is the following. CREATE OR REPLACE PROCEDURE xmlProc RESULT SETS 1 LANGUAGE SQL BEGIN declare Cust XML; set Cust = XMLCAST( '<ROOT> <DataBlock1> <WorkingTag>A</WorkingTag> <IDX_NO>1</IDX_NO> <Status>0</Status> <DataSeq>1</DataSeq> <Selected>1</Selected> <TABLE_NAME>DataBlock1</TABLE_NAME> <CustName>CUST1</CustName> <CustSeq>1</CustSeq> </DataBlock1> <DataBlock1> <WorkingTag>A</WorkingTag> <IDX_NO>2</IDX_NO> <Status>0</Status> <DataSeq>2</DataSeq> <Selected>1</Selected> <TABLE_NAME>DataBlock1</TABLE_NAME> <CustName>CUST2</CustName> <CustSeq>2</CustSeq> </DataBlock1> </ROOT>' AS XML); insert into cust_tab2(cst) select CustName from sysibm.sysdummy1, XMLTABLE('$i' PASSING Cust AS "i" Columns CustName VARCHAR(200) PATH 'ROOT/DataBlock1/CustName') AS T; END@ --->The context item in an axis step must be an XQuery node. Error QName=err:XPTY0020. |