﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 - General  / Order by Date column / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 23 May 2013 20:20:33 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Order by Date column</title><link>http://www.sqlservercentral.com/Forums/Topic1384522-391-1.aspx</link><description>[quote][b]tonyarp05 61903 (11/14/2012)[/b][hr]No still doesnt work, its happening based on seq_no only.PFA[/quote]The output appears to be sorting exactly as specified. It's ordered first by SeqNum and then within each group of SeqNum they are ordered by Date (some of which appear to be blank or null). Another option is to look up some articles on using the ROW_NUMBER() operator for creating nested ordering. That operator can let you do just about any grouping/sorting you want by creating "sort" columns for as many levels or groups you need. This method can be a bit complex, but if you give us some data examples and the desired output then perhaps one of us can give you specific examples to get your desired result. </description><pubDate>Thu, 15 Nov 2012 10:35:35 GMT</pubDate><dc:creator>Steven Willis</dc:creator></item><item><title>RE: Order by Date column</title><link>http://www.sqlservercentral.com/Forums/Topic1384522-391-1.aspx</link><description>In addition, please take the time to read and following the instructions in the first article I have referenced below in my signature block regarding asking for help.We really need the DDL (CREATE TABLE statement) for the table(s) involved, sample data (as a series of INSERT INTO statements) for each table, the expected results based on the sample data, and most importantly your code you are using now.Beyond that, all you are going to get based on an image is guess work, and my crystal ball hasn't worked in years.</description><pubDate>Wed, 14 Nov 2012 07:18:04 GMT</pubDate><dc:creator>Lynn Pettis</dc:creator></item><item><title>RE: Order by Date column</title><link>http://www.sqlservercentral.com/Forums/Topic1384522-391-1.aspx</link><description>[quote][b]tonyarp05 61903 (11/14/2012)[/b][hr]Hi,I have query to execute the output.It should  be sorted with date also, but its sorting with only Seq_no.PFA - for more detailsplease help me on this.[/quote]I agree with what Stewart posted.  You're missing some date data.  Do you want that filled in?  If so, what order do you wannt the dates to "smear" down in?  By Seq-No???</description><pubDate>Wed, 14 Nov 2012 07:17:42 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: Order by Date column</title><link>http://www.sqlservercentral.com/Forums/Topic1384522-391-1.aspx</link><description>Please provide an example of how you expect the output to appear.Per the screenprint, only one of each sequence has a date, which appears with the first row of each sequence.</description><pubDate>Wed, 14 Nov 2012 06:40:13 GMT</pubDate><dc:creator>Stewart "Arturius" Campbell</dc:creator></item><item><title>RE: Order by Date column</title><link>http://www.sqlservercentral.com/Forums/Topic1384522-391-1.aspx</link><description>No still doesnt work, its happening based on seq_no only.PFA</description><pubDate>Wed, 14 Nov 2012 04:50:04 GMT</pubDate><dc:creator>tonyarp05 61903</dc:creator></item><item><title>RE: Order by Date column</title><link>http://www.sqlservercentral.com/Forums/Topic1384522-391-1.aspx</link><description>Have you tried adding the Date column to the ORDER BY clause[code="sql"]ORDER BY Seq, Date[/code]</description><pubDate>Wed, 14 Nov 2012 04:43:23 GMT</pubDate><dc:creator>Stewart "Arturius" Campbell</dc:creator></item><item><title>Order by Date column</title><link>http://www.sqlservercentral.com/Forums/Topic1384522-391-1.aspx</link><description>Hi,I have query to execute the output.It should  be sorted with date also, but its sorting with only Seq_no.PFA - for more detailsplease help me on this.</description><pubDate>Wed, 14 Nov 2012 03:55:20 GMT</pubDate><dc:creator>tonyarp05 61903</dc:creator></item></channel></rss>