• mikeaspnet - Thursday, February 1, 2018 12:53 PM

    That was not my question.
    i'm asking how can i achieve this in T-sql 🙂

    Reason i want to do this in SQL because these are very heavy queries and want to cache the results.
    I in DB field, so can feed fast and consistent presorted data to the web servers, so each server can do what it is best at.
    And as far as i know SQL is the place to sort data and not the webserver.

    SQL tables are UNORDERED.  Storing the data in tables in this format will not guarantee consistent presorted data.  Furthermore, storing data in this format will prevent you from returning consistent presorted data.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA