XMLEXTRACT causing issues for a varchar column to be primary index after conversion
I am facing an issue while extracting an element from XML document and using that as primary index for the table. We are getting online orders information and our order id is burried in the xml as a first element. something like this.
<Order> <onlineorderid>ABC123456</onlineorderid>. I am trying to fetch the value and use it as my primary index in the table.
I am using XMLEXTRACT function and able to fetch that column as VARCHAR(30) UNICODE but when i am trying to use that column as my index it is complaining that LOB's are not allowed in the index. If use XMLTABLE i can parse the columns in the respective SQL data types and use them. Not sure why XMLEXTRACT is giving me the problems here. Any information would be greatly appreciated. I tried transalting the column into latin as well, but no use.