When xmltype is null & I extract xmltype when it will be not null,no rows
450482Feb 25 2008 — edited Mar 26 2008Hello
I am using xmlsequence as follows to extract values from an xmltype column. However when that column has null, I get no rows back. I thought I should be getting null back. When it is not null, I get the rows back using my xmlsequence. My query looks like:
select
extractValue(k.column_value,'c/@set') as c_name,
k.column_value.extract('c/L/key@id').getstringval()) ||' '||
k.column_value.extract('c/op/text()').getstringval() || ' '||
k.column_value.extract('c/R/val/text()').getstringval()
from table1 t1, table(xmlsequence(t1.xmlcol.extract('//c'))) k
I am not sure in this case what is the expected behavior?
Found an example:
select extractValue
(v.department, ‘/Department/DeptInfo/DepartName'),
extractValue(value(v2), '/Employee/EmpName')
from dept_xmlview v,table(XMLSequence(Extract
(v.department, '/Department/Employee')))
v2
What if the xmltype column itself is null? Then in the output I expect a row returned with null or I shouldnt be getting any rows at all?
Message was edited by:
M@$$@cHu$eTt$