News Articles - How do U Sort most recent firsthttp://forums.asp.net/t/1030988.aspx/1?News+Articles+How+do+U+Sort+most+recent+firstWed, 04 Oct 2006 11:23:38 -040010309881414740http://forums.asp.net/p/1030988/1414740.aspx/1?News+Articles+How+do+U+Sort+most+recent+firstNews Articles - How do U Sort most recent first Has anyone figured out how to sort the news article in date desending order?<br> Currently the news sort in ascending order.<br> Ken 2006-09-30T05:35:11-04:001416180http://forums.asp.net/p/1030988/1416180.aspx/1?Re+News+Articles+How+do+U+Sort+most+recent+firstRe: News Articles - How do U Sort most recent first <p>In the stored procedure 'PagedAnnouncementList' in your ClubSite Database&nbsp;you have to change the SQL statement from:</p> <p><font color="#0000ff" size="2"><span class="sqlkwd">SELECT</span> id, itemdate, title, <span class="sqlkwd">description</span>, photo <span class="sqlkwd">FROM</span> Announcements <br> <span class="sqlkwd">WHERE</span> (itemdate &gt; @keydate <span class="sqlkwd3">OR</span><br> (itemdate = @keydate) <span class="sqlkwd3">AND</span> (id &gt; @keyid))<br> <strong><span class="sqlkwd">ORDER BY</span> itemdate <span class="sqlkwd">ASC</span>, id <span class="sqlkwd">ASC</span></strong> </p> <p>&nbsp;To the following:</p> </font> <p></p> <pre class="prettyprint">SELECT id, itemdate, title, description, photo FROM Announcements WHERE (itemdate &gt; @keydate OR (itemdate = @keydate) AND (id &gt; @keyid)) <strong>ORDER BY itemdate DESC, id DESC</strong></pre>&nbsp; 2006-10-02T19:00:55-04:001416382http://forums.asp.net/p/1030988/1416382.aspx/1?Re+News+Articles+How+do+U+Sort+most+recent+firstRe: News Articles - How do U Sort most recent first <p>I figured it would be an order by clause.</p> <p>But where do I find this.&nbsp; I have never worked with stored procedures before...<br> Have search for PagedAnnouncementList but the sql mentioned above does not appear.<br> So obviously I am missing something.</p> 2006-10-02T22:25:20-04:001416423http://forums.asp.net/p/1030988/1416423.aspx/1?Re+News+Articles+How+do+U+Sort+most+recent+firstRe: News Articles - How do U Sort most recent first <p>Go to management studio open the clubstarter kit database and go to stored procedures and look for the above stored proc it has to be there.&nbsp; And here is how you change it with the database open right click on it in the object browser and click on ALTER, make the above changes to the last line relating to Order By and execute it in management studio.&nbsp; Hope this helps.</p> 2006-10-02T23:09:59-04:001416643http://forums.asp.net/p/1030988/1416643.aspx/1?Re+News+Articles+How+do+U+Sort+most+recent+firstRe: News Articles - How do U Sort most recent first <p>Awesome - Many thanks<br> I was not aware that this code was here. (newbie learning [:&#36;])</p> <p>From your info, I was able to modify the sql and pull the right info.<br> </p> 2006-10-03T07:17:27-04:001416933http://forums.asp.net/p/1030988/1416933.aspx/1?Re+News+Articles+How+do+U+Sort+most+recent+firstRe: News Articles - How do U Sort most recent first [quote user=&quot;ken240&quot;] <p>Awesome - Many thanks<br> I was not aware that this code was here. (newbie learning [:&#36;])</p> <p>From your info, I was able to modify the sql and pull the right info.<br> </p> <p></p> <blockquote></blockquote> <p></p> <p>I am glad I could be of help to you.</p> 2006-10-03T14:00:35-04:001417979http://forums.asp.net/p/1030988/1417979.aspx/1?Re+News+Articles+How+do+U+Sort+most+recent+firstRe: News Articles - How do U Sort most recent first I don't seem to be able to change this procedure in VB web Express, am I being stupid or can Express not do this? 2006-10-04T11:09:13-04:001417995http://forums.asp.net/p/1030988/1417995.aspx/1?Re+News+Articles+How+do+U+Sort+most+recent+firstRe: News Articles - How do U Sort most recent first <p>You are using the wrong tool, if you don't have it download SQL Server Express Advanced&nbsp;from the link below and you can use the management studio to do it.&nbsp; Hope this helps.</p> <p><a href="http://msdn.microsoft.com/vstudio/express/sql/compare/default.aspx">http://msdn.microsoft.com/vstudio/express/sql/compare/default.aspx</a></p> 2006-10-04T11:23:38-04:00