Offset news in widget scrolling news

Merete Nor Midtskog asked on March 17, 2014 08:24

I want to show five news, but starting from the second one, because the first one is shown by another webpart on the same page.

Recent Answers


Richard Sustek answered on March 18, 2014 07:30

Hi,

Thank you for your message.

It depends on which SQL and version you are using. The easiest solution which is available in MS SQL 2012 is to update your Order by expression in the webpart to be like:

NewsReleaseDate DESC OFFSET 1 ROWS

In another version of MS SQL its different, I would recommend this as a reference -> http://stackoverflow.com/questions/187998/row-offset-in-sql-server

Let me know how that works and if you have further questions.

Kind regards,

Richard Sustek

0 votesVote for this answer Mark as a Correct answer

Merete Nor Midtskog answered on March 18, 2014 07:48

Hi, I used this in "Latest news" webpart: (Placed in WHERE condition:) NewsID NOT IN (Select TOP 1 NewsID from View_CONTENT_news_Joined where NodeSiteID = 26 ORDER BY NewsReleaseDate DESC)

but now I am trying to set it in a widget named "Scrolling news for Corporate Sites" Image Text

There si no place for WHERE condition or Order by expressions

Kind regards, Merete

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 19, 2014 07:21

In this case you might be better using a webpart than a widget, if possible.

0 votesVote for this answer Mark as a Correct answer

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