select * from tbl_WorkFlowMembers where WorkFlow_ID IN (Select wm.WorkFlow_ID,* from [dbo].[tbl_WorkFlowMembers] wm
JOIN [dbo].tbl_WorkFlow w ON w.WorkFlow_ID = wm.WorkFlow_ID
where User_ID='ASAPRA' and w.Country_Code='BH'
order by wm.WorkFlow_ID, wm.Approver_Sequence)
order by WorkFlow_ID,Approver_Sequence
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.
No comments:
Post a Comment