Forum Replies Created

Viewing 4 posts - 16 through 20 (of 20 total)

  • RE: Retrieving status from history

    I should add that, because OrderStatusID is the clustered primary key, which is why I opted to use it for my sort (MAX(OrderStatusID)) and join.

  • RE: Select top five rows for each key value

    Can you use the RANK() function? Something like...

    SELECT A.Key, A.Date, A.Status, A.Ranking

    FROM (SELECT Key, Date, Status

    , RANK() OVER(PARTITION BY Key ORDER BY Date DESC) AS Ranking

    FROM table) A

    WHERE A.Ranking <=...

  • RE: concatenating distinct values in a data flow task

    Koen, You had me until script component. Once you got there, it didn't feel any more graceful than doing it inside the stored procedure. Oh, well. Thanks for putting the...

  • RE: multiple join conditions and OR

    I confused things a little by typing the result set wrong. I expected:

    ABCDEF

    ABCABC

    DEFDEF

    and got:

    ABCDEF

    ABCABC

    ABCDEF

    DEFDEF

    In other words, (ABC, DEF) got doubled up. But the responses from Steve and Celko gave me...

Viewing 4 posts - 16 through 20 (of 20 total)