Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JL-Ikosoft opened this issue May 5, 2022 · 0 comments

Comments

@JL-Ikosoft
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant