Skip to content

xml data type cannot be compared or sorted except when using the is null operator #63

@JL-Ikosoft

Description

@JL-Ikosoft

Hello :)

Running 2.8.0, does the OData parser adds each fields in the "Order By" SQL request?
I have a SQL view named View_MyTable below that i query using OData:

select Id, cast(MY_NTEXT_FIELD as XML) as [MyXmlField] from MyTable

But i receive a xml data type cannot be compared or sorted except when using the is null operator error.

SQL query being executed looks like this:

SELECT TOP(@__p_0) [o].[id], [o].[MyXmlField]
FROM [View_MyTable] AS [o]
ORDER BY [o].[id], [o].[MyXmlField]

The XML data type field should not be used in the ORDER BY clause.

Do you have any idea how to fix this?

Kind regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions