Forum Replies Created

Viewing 15 posts - 736 through 750 (of 4,085 total)

  • RE: Calculation problem on Query

    Your query contains two tables, but you've only provided one sample table.  Furthermore, the fields in your sample table do not match the fields in either of the tables in...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Automatically inserting foreign keys

    I don't think that you want to do this in general.  I could see doing this as part of an application, but the application would probably feed the information into...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Can NULLs Exist in the Columns of a Non-Clustered Index?

    Gail Wanabee - Wednesday, January 9, 2019 4:39 PM

    Thanks for the query, Drew.
    I believe you are correct. However, I commented out this line...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Running total issue

    I should also add that it's pointless to ORDER BY one of the partition expressions (in this case YearMonth).  By definition, all rows within a partition have the same exact...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Can NULLs Exist in the Columns of a Non-Clustered Index?

    I ran the following test on a SQL 2016 box and the query used an index seek, so this claim is false.

    CREATE TABLE #TEST ( id...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: SSIS: Changing target table without remapping all table columns

    The package is just an XML file.  In some cases, it's easier to make simple changes in the XML rather than using the GUI.  I believe that this is one...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: substring with Charindex

    Michael L John - Tuesday, January 8, 2019 1:14 PM

    ettentrala - Tuesday, January 8, 2019 12:16 PM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Dynamic creation of an ASCII "banner"

    It reminds me of ASCII art from the 80s (70s?) and it definitely works best with a fixed-width font.  I still think it's more trouble than it's worth, but here...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Dynamic creation of an ASCII "banner"

    It shouldn't be that hard to create, but I also have to ask why.  For any kind of report that might need this, I would use reporting software where you...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Cross compare from within the same table.

    A loop is definitely not necessary (and will perform badly to boot).  Have you tried the sub-query?  My first thought was a LEFT OUTER JOIN.  See if you can figure...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: how to do this join?

    Jeff Moden - Thursday, January 3, 2019 8:22 PM

    APPLY works out to be the same as a correlated subquery that can return...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: SQL Optimization

    You should generally avoid functions/conversions on fields in ON/WHERE clauses.  You have multiple functions/conversions in your ON clause, which is why you are having problems.

    Part of the issue...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Wishing for a Data Glitter Bomb

    Eric M Russell - Wednesday, January 2, 2019 12:14 PM

    There is an old saying that: "You can't hunt what you can't...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Wishing for a Data Glitter Bomb

    I back a lot of board games on Kickstarter, and I eventually decided to get a PO Box at a UPS store for package deliveries, because too many of my...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Today's Random Word!

    ManicStar - Monday, December 31, 2018 9:47 AM

    DesNorton - Thursday, December 27, 2018 11:50 PM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 736 through 750 (of 4,085 total)