Hi,
Im very new to CTE. I have a nested select statement for CTE like the one below but i keep hitting this error:
Msg 1033, Level 15, State 1, Line 13
The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP, OFFSET or FOR XML is also specified.
With t as
(select distinct N from listofnumbers)
select nums.h, nums.m
from (select N/60/60 as H, (N/60)%60 as M from t order by N) as nums
How to I query the CTE defined?
cherriesh