i am working on my project and i have to create a sql query to achieve my aims. but unfortunately i get an error when i run the query.
here is my Sql query :
select ROW_NUMBER()
OVER (ORDER BY Advertisement.AdsDate asc ) AS AdsIndex
,Advertisement.AdsId , Advertisement.AdsEnTitle from Advertisement
where Advertisement.Status=N'True' and AdsIndex<=17 and AdsIndex>=11
Error :
Invalid column name 'AdsIndex'.
How should i solve my problem ?