I have a table with only 1 column as
Table : profileTable
//--------------
profile XML;
//--------------
A sample content of XML file is
<sampleprofil e name="joe" version="A123">
<phone>12345678 9</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(pr ofile) GENERATE KEY USING
XMLPATTERN '/sampleprofile/@name' AS VARCHAR(16)
CREATE INDEX index2 ON profileTable(pr ofile) GENERATE KEY USING
XMLPATTERN '/sampleprofile/@version' AS VARCHAR(16)
But although '/sampleprofile/@name | /sampleprofile/@version' is a
valid PATH expression I was unable to create an index like
CREATE UNIQUE INDEX index3 ON profileTable(pr ofile) GENERATE KEY
USING XMLPATTERN 'sampleprofile/@name | /sampleprofile/@version' AS
VARCHAR(32)
Regards
Rajesh
Table : profileTable
//--------------
profile XML;
//--------------
A sample content of XML file is
<sampleprofil e name="joe" version="A123">
<phone>12345678 9</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(pr ofile) GENERATE KEY USING
XMLPATTERN '/sampleprofile/@name' AS VARCHAR(16)
CREATE INDEX index2 ON profileTable(pr ofile) GENERATE KEY USING
XMLPATTERN '/sampleprofile/@version' AS VARCHAR(16)
But although '/sampleprofile/@name | /sampleprofile/@version' is a
valid PATH expression I was unable to create an index like
CREATE UNIQUE INDEX index3 ON profileTable(pr ofile) GENERATE KEY
USING XMLPATTERN 'sampleprofile/@name | /sampleprofile/@version' AS
VARCHAR(32)
Regards
Rajesh