i am creating a procudure for temp table.
IF EXISTS (SELECT TEMP1.*,TEMP1.Total + (SELECT COALESCE(SUM(Total),0) FROM TEMP1 t1 WHERE t1.ROWNO
ORDER BY OrderID
)
DROP TABLE TEMP1
in this i am getting error,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.
please help me how to resolve this???
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Manas MohapatraRank #182 · 13.2K reputationPosted Jun 2, 2017, 4:25 AM EDT