my stored procedeur like this:
alter PROCEDURE [dbo].[ParkingDeatailsReportnewstack] @startdate NVARCHAR(100), @enddate NVARCHAR(100)AS BEGIN DE
We can fix the problem very easily by adding a TOP 100 PERCENT clause into the view definition. Try using this way - http://www.sqlpassion.at/archive/2015/05/25/the-ambiguity-of-the-order-by-in-sql-server/