Forum Replies Created

Viewing 15 posts - 1,171 through 1,185 (of 4,085 total)

  • RE: Help in writing query for update

    Thom A - Wednesday, June 27, 2018 8:14 AM

    Sudhakar Ramakrishnan - Wednesday, June 27, 2018 7:53 AM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Odd results from WHERE in SQL

    Lynn Pettis - Tuesday, June 26, 2018 8:27 AM

    Here is my critique of your code based T-SQL:

     AND (NOT ([sl].[LastName]...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Optimization of sql server big query

    It's almost impossible to read this the way that it's formatted.

    The only obvious thing that I see is that you have a function on one of the fields...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Help in writing query for update

    Thom A - Tuesday, June 26, 2018 7:30 AM

    drew.allen - Tuesday, June 26, 2018 7:14 AM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Help in writing query for update

    Thom A - Tuesday, June 26, 2018 5:48 AM

    This is one solution, however, I'm not a fan of it. A calendar table...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Please help - complete missing data with latest recorded

    Lynn Pettis - Monday, June 25, 2018 11:45 AM

    Still need to learn LEAD/LAG but would think one of these would be something to...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Find differences without cursor

    You need to be careful here, because the date arithmetic isn't automatically applied correctly.  Specifically, 201801 - 1 is 201800 instead of 201712.  This is part of the reason that...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Generate XML with name/value pair using FOR XML

    Torin - Thursday, June 21, 2018 12:43 PM

    Hi Drew,
    you are correct that I missed that change in the code.
    Here are the results...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Generate XML with name/value pair using FOR XML

    Torin - Thursday, June 21, 2018 11:22 AM

    Adding the ELEMENTS parameter changes it to the standard XML elements notation, not the Name/value...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Generate XML with name/value pair using FOR XML

    Try the following:

    SELECT TOP 20 [key].name AS [@name], RTRIM([key].value) AS value...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: SUM(CASE(CASE(SUM()))) ?

    ste.cox - Thursday, June 21, 2018 9:27 AM

    am i missing something obvious?

    Yes, you're missing the fact that addition is associative.  The SUM...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Avoid subselects for single condition with max()

    adiedler - Tuesday, March 13, 2018 12:10 PM

    Sorry guys, there is an error in the SQL, the right used SQL looks like...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: FOR XML RAW

    sgmunson - Friday, March 9, 2018 11:37 AM

    sql_learner29 - Friday, March 9, 2018 11:21 AM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: FOR XML RAW

    Your big mistake was using the RAW option.  That gives you very little control over the output.  You're much better off using the PATH option for most purposes or the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: null date parameter for a stored procedure

    Lynn Pettis - Tuesday, March 13, 2018 11:08 AM

    sqlfriends - Tuesday, March 13, 2018 11:05 AM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 1,171 through 1,185 (of 4,085 total)