Dear Experts,
I have a query as under :
SELECT T1.Name, T1.OpprId, T1.OpenDate, T0.Step_Id, T0.Line, T0.OpprId, T0.U_status, T2.Name FROM OPR1 T0 INNER JOIN OOPR T1 ON T0.OpprId = T1.OpprId INNER JOIN [dbo].[@STAGE] T2 ON T0.U_status = T2.Code WHERE T1.Name = 'ORDER'
Now I want that this query should give me the last row detail in the Stage TAb of Sales opportunity. Now this query is giving me every row stage details which are put in the Stage Tab. For example in the Stage Tab of Sales Opportunity there are 4 rows of Stages, its giving me all the 4 row stages in the query. I want that only the last stage should be displayed in the query may be it's on 2 second stage or 3 rd ot 4 th. I want only last stage to be shown.
Please advise what I need to do for the above query.
Regards,
Kamlesh