XML : pymssql : How to get distinct rows when a column has XML values

I am trying to use distinct in a query for a table that has XML values. Here is my query

  select distinct pID,docXml from docTable where docXml is not null and pID not like '%xyz%'    

but i get

  pymssql.OperationalError: (421, 'The xml data type cannot be selected as DISTINCT because it is not comparable.DB-Lib error message 20018, severity 16:\nGeneral SQL Server error: Check messages from the SQL Server\n')    

how to solve this? what does it mean?

No comments:

Post a Comment