User-830595639 posted
Hi All,
I have a requirement as follows for a multilingual application, where the columns displayed on a search are picked up from configuration, and the data can be sorted based on configuration.
Question 1 - I am using a Select query like this:
"SELECT * FROM TABLE ORDER BY 1 COLLATE SQL_Latin1_General_CP1_CI_AS DESC, ORDER BY 4 COLLATE
SQL_Latin1_General_CP1_CI_AS DESC"
Getting an error "Expression type int is invalid for COLLATE clause."
Question 2 - I would also need to support integer column based sorting like "ID"
But get the same error as mentioned for question 1
Are there any workaround to support both use-cases.
Or is this an SQL Server limitation that we have to live with even with the latest version of SQL Server 2016?
Would appreciate a quick response.
Thanks & Regards,
Nishant