You cannot use that named column that you're creating in the same query, you need to either use a subquery, or a CTE or create a view. The CTE would be something like this:WITH RowsTable AS( SELECT (ROW_NUMBER() OVER (ORDER BY ct.[RANK] DESC)) AS RowNum, e.* FROM CONTAINSTABLE (Stock, *, '( "acer" OR "monitor" )') As ct JOIN Stock As e ON ct.[KEY] = e.StockID WHERE (ct.[RANK] > 0))SELECT *FROM RowsTableWHERE (RowNum >= 1) AND (RowNum < 21)ORDER BY RowNum