I have a table with only 1 column as
Table : profileTable
//--------------
profile XML;
//--------------
A sample content of XML file is
<sampleprofile name="joe" version="A123">
<phone>123456789</phone>
...
...
</sampleprofile>
//------------------------------------
How can we create a UNIQUE index which includes both the 'name' and
'version' attributes?
I was able to create following indexes:
CREATE INDEX index1 ON profileTable(profile) GENERATE KEY USING
XMLPATTERN '/sampleprofile/@[EMAIL PROTECTED]
' AS VARCHAR(16)
CREATE INDEX index2 ON profileTable(profile) GENERATE KEY USING
XMLPATTERN '/sampleprofile/@[EMAIL PROTECTED]
' AS VARCHAR(16)
But although '/sampleprofile/@[EMAIL PROTECTED]
| /sampleprofile/@[EMAIL PROTECTED]
' is a
valid PATH expression I was unable to create an index like
CREATE UNIQUE INDEX index3 ON profileTable(profile) GENERATE KEY
USING XMLPATTERN 'sampleprofile/@[EMAIL PROTECTED]
| /sampleprofile/@[EMAIL PROTECTED]
' AS
VARCHAR(32)
Regards
Rajesh