• geert.de.vylder (3/6/2013)


    ChrisM@Work (3/6/2013)


    This data set obviously isn't what you were expecting to see, even though it exactly meets your requirements. What would you like to do with it?

    I have to update the data set into another database on a local server in development and on another remote server in production. The other database is used for reporting.

    Greetz,

    Geert

    I meant in terms of potentially reducing the rowcount.

    Let's call a set from this table containing the same day, all of the intervals, and the same Event_Channel, a frame. One frame contains 96 rows, one row per interval. There are 9 event channels so there are 864 rows per date. Multiply 864 by the number of dates in the tickets table - 1366 - to yield the number of rows in the matrix table.

    One possibility is to remove frames which don't have any corresponding rows in the tickets table.

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden