You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This query should cause the error message below. If uncommenting the UNION ALL the error messages appears.
The ORDER BY clause is invalid in derived tables, subqueries, and common table expressions, unless TOP is also specified.
WITH MyEmployees AS (
SELECTe.FirstName+''+e.LastNameAS FullName,
e.Region,
e.CountryFROM Employees e
WHEREe.Country='USA'UNION ALLSELECT'Immo Landwerth',
'Bavaria',
'Germany'
ORDER BY 1
)
SELECTe.FullName,
e.CountryFROM MyEmployees e
The text was updated successfully, but these errors were encountered:
Hmm, is this really required? I mean the ORDER BY works and doesn't hurt (besides perf, eventually), and if the error message would be implemented one could always work around the limitation by specifying the TOP 100 PERCENT clause, so from my point of view this whole additional error message wouldn't add much value to NQuery.
Ported from CodePlex
This query should cause the error message below. If uncommenting the
UNION ALL
the error messages appears.The
ORDER BY
clause is invalid in derived tables, subqueries, and common table expressions, unlessTOP
is also specified.The text was updated successfully, but these errors were encountered: