-- first workaround
GO
create view dbo.vPersonContactOrdered
as
select top 99.99999999999 percent * from Person.Contact
order by firstname, lastname
GO
select * from dbo.vPersonContactOrdered -- it works
GO
create view dbo.vPersonContactOrdered2
as
select *, row_number() over (order by firstname, lastname) as rownumber from Person.Contact
GO
select * from dbo.vPersonContactOrdered2 -- it also works
GO
|