Forum Replies Created

Viewing 15 posts - 3,361 through 3,375 (of 4,086 total)

  • RE: Returning a column per date in a range

    SQL Kiwi (1/12/2012)


    What is exactly your point?

    My point is that it's not only possible, but extremely likely to read your comments as recommending using an rCTE for new development for...

  • RE: Returning a column per date in a range

    SQL Kiwi (1/12/2012)


    drew.allen (1/12/2012)


    ...the OP doesn't have ANY code in place and is looking for the best solution...

    The thread starter was not Bob Cullen (the chap playing around with an...

  • RE: Returning a column per date in a range

    SQL Kiwi (1/12/2012)


    Jeff and Chris,

    You've missed the point I was making, and have chosen to assume that I am either (a) not aware of the performance issues involved; or (b)...

  • RE: if 2nd year and same Programme for same Student, then return no results

    drew.allen (1/11/2012)


    I think it's actually even simpler.

    SQL Kiwi (1/11/2012)


    That has a different semantic though. Example:

    That's true, but this statement from the original poster sounds like the GROUP BY is...

  • RE: SQL Server equivalent to DB2 HEX

    SQL Kiwi (1/11/2012)


    Greg Snidow (1/11/2012)


    The 'B' shows up no matter what I put in for the length parameter of CHAR. I still don't know what it means.

    So 'B' is...

  • RE: if 2nd year and same Programme for same Student, then return no results

    I think it's actually even simpler.

    SELECT StudentID, Programme, Min([Year]) AS [Year]

    FROM #Students

    GROUP BY StudentID, Programme

    HAVING Min([Year]) = 2009

    You may not even need the HAVING clause depending on what you are...

  • RE: Returning a column per date in a range

    SQL Kiwi (1/11/2012)


    You might have missed that I quoted the performance impact directly from the article "(150ms from Jeff's article graph)", which is one I have read many times (see...

  • RE: Returning a column per date in a range

    SQL Kiwi (1/11/2012)


    drew.allen (1/11/2012)


    Bob Cullen-434885 (1/10/2012)


    I started to look at an alternative approach, using a recursive CTE to generate a continuous list of dates that covered the report range

    Jeff Moden...

  • RE: Returning a column per date in a range

    Bob Cullen-434885 (1/10/2012)


    I started to look at an alternative approach, using a recursive CTE to generate a continuous list of dates that covered the report range

    Jeff Moden has an article...

  • RE: Need to audit update without cursor

    GSquared (1/9/2012)


    Audit logging doesn't need to use the "inserted" data. You already have that in the table you just updated. Logging it just increases the size of the...

  • RE: How to do bitwise operation between strings? Thanks.

    halifaxdal (1/9/2012)


    Each digit represents a record in another table, let me explain here so you can see if my design is good, your suggestion could be better though:

    Table 1: has...

  • RE: Need to audit update without cursor

    This is sometimes done using a trigger, but you may not have rights to create a trigger on the table being updated. Another option is to use the OUTPUT...

  • RE: Update with except conditon

    ChrisM@home (1/5/2012)


    You've lost me Drew - I understand that the query I posted is incorrect, but how does the (theoretical) sample data I posted violate normalization?

    I didn't notice that you...

  • RE: How to insert multiple rows into a table with identity column

    CELKO (1/5/2012)


    But IDENTITY is a sequential count of insertion attempts. PHYSICAL insertion attempts. Not a LOGICAL concept at all. So how do you number these rows?

    You're confusing what IDENTITY is...

  • RE: Row to column

    You can use UNPIVOT, but that gets very messy when you're trying to unpivot into more than one column. You would need three.

    You can also use CROSS APPLY to...

Viewing 15 posts - 3,361 through 3,375 (of 4,086 total)