I have a stored procedure that needs to select some data into a table variable, but I am having trouble because I need a dynamic where clause and SQL Server 2000 does not seem to like using an EXEC() ...
So I wanna sort something like "The Who" or "The Grateful Dead" by 'W' and 'G', respecively. How does one accomplish this? I tried using a function in the ORDER BY clause, but SQL syntax doesnt seem ...
SELECT JSON_VALUE([j].[Reference], '$.TestDefaultString') AS [TestDefaultString], JSON_VALUE([j].[Reference], '$.TestMaxLengthString') AS [TestMaxLengthString], CAST ...