Forum Replies Created

Viewing 15 posts - 1,006 through 1,020 (of 6,036 total)

  • RE: GROUP BY in SQL Server 2014

    Jeff Moden (12/21/2016)


    CELKO (12/14/2016)


    Let's have a look at the ever so humble Tally Table. For those that don't know how to create one, here's the code to do so.

    ...

  • RE: GROUP BY in SQL Server 2014

    Jeff Moden (12/21/2016)


    So, ORDER BY doesn't necessarily do anything but guarantee the order and it certainly doesn't guarantee the SELECT will become a cursor because the SELECT is already a...

  • RE: GROUP BY in SQL Server 2014

    whenriksen (12/21/2016)


    CELKO (12/19/2016)


    The best teachers I ever had were the ones that humiliated me when I was blindly stupid and could not get the basic concepts.

    Here you just scare people...

  • RE: Overlapping datetime ranges.

    Here is something to start with:

    SELECT ID, FromValue, ToValue

    INTO #Periods

    FROM (

    SELECT 1, 2.1, 8.0

    UNION

    SELECT 2, 3., 4.5

    UNION

    SELECT 3, 4., 10.

    UNION

    SELECT 4, 9., 20.

    ) I (ID, FromValue, ToValue)

    SELECT...

  • RE: Let the optimizer do it's thing -- wrong

    Indianrock (12/14/2016)


    Yes ORM-generated sql. Ours is a version called Domain Objects written by a former developer here. Others include Entity Framework and Hibernate. That sql code...

  • RE: Bitwise & NULL

    ScottPletcher (12/15/2016)


    Pretty soon you'll see in queries "WHERE Status&8 >0".

    I guess I don't see why that's so much worse than a non-bit comparison of "status = 8" or "code1...

  • RE: Bitwise & NULL

    Sioban Krzywicki (12/15/2016)


    Jeff Moden (12/14/2016)


    Sioban Krzywicki (12/14/2016)


    What if the bitwise column never appears in the WHERE clause? What if all the values in the column are always returned?

    Who's going to...

  • RE: Latin small letter u with diaeresis

    etl2016 (12/15/2016)


    okay, I think I got the difference when i did the hex dump using convert(varbinary(max), sourcecolumn)

    At source, the content looks like the character "En dash" with ASCII HEXcode...

  • RE: Latin small letter u with diaeresis

    Check hex view of your inbound string.

    Chances are that hyphen is not actually a normal hyphen but in fact some UTF8 hyphen.

  • RE: Comparing Execution Plans

    Grant Fritchey (12/15/2016)


    So 36% of people thought that either: You don't need to compare them since the graphical plans are the same, which is blatantly false, or that You can...

  • RE: Bitwise & NULL

    Sioban Krzywicki (12/14/2016)


    Sergiy (12/14/2016)


    Sioban Krzywicki (12/14/2016)


    What if the bitwise column never appears in the WHERE clause? What if all the values in the column are always returned?

    Then they are not...

  • RE: Let the optimizer do it's thing -- wrong

    We can blame the ORM tool for everything (probably even deserving), but in this case, I reckon, the query it's generated only reflects the mess in the code upstairs.

  • RE: Let the optimizer do it's thing -- wrong

    What a weird code!

    .... SERVICED_COLLATERAL_GROUP_ITEM AS ServicedAccount14

    ...

  • RE: Bitwise & NULL

    Sioban Krzywicki (12/14/2016)


    What if the bitwise column never appears in the WHERE clause? What if all the values in the column are always returned?

    Then they are not needed.

  • RE: Comparing Execution Plans

    Koen Verbeeck (12/14/2016)


    Igor Micev (12/14/2016)


    Nowhere in the question is stated that the SSMS is 2016 version. "Compare Showplan" is not available in the lower versions.

    So the answer is not...

Viewing 15 posts - 1,006 through 1,020 (of 6,036 total)