Can we assign at two places value of ##WHERE## macro. I need in this way because I am calculating its value based on querystring paramter.
This is my query
Select Sub.* From
(
Select ROW_NUMBER() OVER (PARTITION BY Specie ORDER BY Specie) AS [row_number],
SiteName, NodeAliasPath, DocumentNamePath,[ArticleID],[Headline]
,[Author],[Summary],[Image],[FullArticle],[Video],[Quotes]
,[Specie],[Date]
From View_CMS_Tree_Joined INNER JOIN pm_article ON
DocumentForeignKeyValue = pm_article.ArticleID
Where ClassName IN ('pm.Article') and Specie = Case 'All' When 'All' Then Specie Else 'Horses' END
) Sub
Where Sub.Row_Number <= Case 'All' When 'All' Then 2 ELSE Sub.Row_Number END
The last where clause I wish to put in 2nd ##WHERE## macro