• It looks like either your result set does not match your requirement or your requirement is still unclear...

    Example:

    companynamedistrictnamestorenbrbusinessdateMatureMathAudioBooks

    OnlineDotComHuntsville00052009-09-07 00:00:00.00017521752360

    OnlineDotComHuntsville00052009-09-07 00:00:00.00023882388519

    OnlineDotComHuntsville00052009-09-07 00:00:00.00019931993379

    It shows that there is more than one row for the same day and the same store.

    That's different than your requirement from a few posts back.

    You also didn't state on how the business date column needs to be sorted.

    You also haven't answer my question regarding the reason to order it by storenbr.

    Regarding your requirement to get the date format correct: I think that's the easy part you can help us help you: please have a look at BOL (SQL OnlineHelp system installed together with your SQL Server).

    Two more notes:

    a)

    But if i can get data in correct sort order, I can avoid doing a dataview in my .NET program. Not important.

    That really means something to me (someone who's trying to help you!)! Sounds like "It's not important at all. Just want to see if you folks in the forum can solve it."

    b)

    I will ultimately have to convert this over to an Oracle procedure which has different syntax but T-SQL will work for now.

    Maybe you should ask your question on a Oracle forum!

    Final statement from my side:

    Since it is

    a) unclear, what the OP want,

    b) obviously, not important to the OP and

    c) for Oracle instead of SQL Server

    I'm outta here. Have fun, whoever stays in here...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]