How to exclude top N documents from a selection

Kentico Support asked on May 31, 2013 17:58

How to exclude top N documents from a selection

Correct Answer

Kentico Support answered on May 31, 2013 17:58

To exclude first (or N) documents from a selection of your listing web part like a repeater (according to the time of creation in this example) please fill the WHERE condition property as one below:

DocumentID NOT IN (SELECT TOP <number of excluded documents, e.g. 1> DocumentID FROM View_CMS_Tree_Joined WHERE ClassName = '<class name like CMS.News>' ORDER BY DocumentCreatedWhen DESC)

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.