Forum Replies Created

Viewing 15 posts - 8,131 through 8,145 (of 10,144 total)

  • RE: SQL 2005 Holding the last not value on several columns

    Jacco

    Assuming there are no gaps in your identity column:

    ;WITH Results AS (

    SELECT pkId, Col1, Col2, Col3, Col4

    FROM dbo.tblDemo

    WHERE pkId = 1

    UNION ALL

    SELECT s.pkId,

    ISNULL(s.Col1, r.Col1),

    ISNULL(s.Col2, r.Col2),

    ISNULL(s.Col3, r.Col3),...

  • RE: Are the posted questions getting worse?

    Paul White (2/22/2010)


    Chris Morris-439714 (2/22/2010)


    No, really! And you, Mr White, should write an article on APPLY. I'm learning tons from reading your recent posts and I'm sure I'm not alone....

  • RE: Are the posted questions getting worse?

    Paul White (2/22/2010)


    Chris Morris-439714 (2/22/2010)


    :blush: time for more reading, less writing.

    :laugh: Yeah, right! :laugh:

    No, really! And you, Mr White, should write an article on CROSS APPLY. I'm learning tons from...

  • RE: Are the posted questions getting worse?

    GSquared (2/22/2010)


    Paul White (2/22/2010)


    Is it just me...or are the posted questions getting better?

    :smooooth:

    Paul

    Questions seem okay right now. Some of the answers have been abysmal recently. I guess it...

  • RE: Are the posted questions getting worse?

    Grant Fritchey (2/19/2010)


    Chris Morris-439714 (2/19/2010)


    Grant Fritchey (2/18/2010)


    ... I don't think I've got some great advantage over others...

    SQL Server 2008 Query Performance Tuning Distilled

    SQL Server Execution Plans

    There's more than one copy...

  • RE: Are the posted questions getting worse?

    Grant Fritchey (2/18/2010)


    ... I don't think I've got some great advantage over others...

    SQL Server 2008 Query Performance Tuning Distilled

    SQL Server Execution Plans

    There's more than one copy here, and we're not...

  • RE: complex join

    APIJENA (2/18/2010)


    Thanks ChrisM@home for the reply, but tab2 doesn't have 'city' column.

    as mentioned in the step 2, I want to join, on city, records matched in step1 with those didnt...

  • RE: Are the posted questions getting worse?

    Paul White (2/18/2010)


    Chris Morris-439714 (2/18/2010)


    Paul White (2/18/2010)


    Oh dear, I posted a reply to that identity-order thread before checking here :ermm:

    It's a great answer and needed to be said on the...

  • RE: Are the posted questions getting worse?

    Paul White (2/18/2010)


    Oh dear, I posted a reply to that identity-order thread before checking here :ermm:

    It's a great answer and needed to be said on the thread.

  • RE: Tsql conditional Join

    phumlo1 (2/10/2010)


    Hi All,

    I have a table-- TableA which could be linked to either TableB or TableC. I want to join either of the latter depending on which one is...

  • RE: Are the posted questions getting worse?

    Alvin Ramard (2/9/2010)


    Oh oh. Someone is asking for documentation or white paper for the "command". :w00t:

    Gus, wipe that smile off you face! 😀

    The white paper won't be published...

  • RE: Cannot Get Average of rowcount: Msg 130, Level 15, State 1, Line 1 Cannot perform an aggregate function on an expression

    Andrew Watson-478275 (2/9/2010)


    Could be I'm just being thick (it wouldn't be the first time), but I don't follow how the DATEDIFF(hh,0,EventTime) can work.

    select datediff(hh,0,'09 feb 2010 12:34:56') returns 965196

    and select...

  • RE: Stored Procedure

    TheSQLGuru (2/8/2010)


    I wonder if the OP realizes that he/she is open to still putting in a record that already exists without proper transactioning/locking, especially if they do it in a...

  • RE: Linking to the Previous Row

    peter-757102 (2/8/2010)


    Chris Morris-439714 (2/8/2010)


    peter-757102 (1/23/2009)


    Nice work, Peter, but I'm curious - if a CTE doesn't generate any kind of intermediate result, then how might a recursive CTE work? Bear in...

  • RE: Linking to the Previous Row

    peter-757102 (1/23/2009)


    I understand your point of view as well as the theory you put forward as to why it might be different in case of my proof. Therefore I did...

Viewing 15 posts - 8,131 through 8,145 (of 10,144 total)