Forum Replies Created

Viewing 15 posts - 76 through 90 (of 386 total)

  • Reply To: A DateRange Table Valued function

    Just for giggles and grins today, I wrote a version of Jonathan's function that is similar but does not use the CROSS JOIN nor the IIF/CASE statements:

    CREATE...
  • Reply To: A DateRange Table Valued function

    Jeff Moden wrote:

    IMHO, the closest thing to a CROSS APPLY is a "Correlated Sub-Query" with an implicit join, which can return more than one row per input row if you're not...

  • Reply To: A DateRange Table Valued function

    Personally, I would avoid recursive CTEs whenever possible. By using the Tally, it replaces the hidden loop that the recursive CTE performs with an efficient set-based manner. Take a look...

  • Reply To: Create a Tally Function (fnTally)

    It's true that the result is the same either way, however I prefer not to use the old method you have in your FROM statement of comma separated sources instead...

  • Reply To: Create a Tally Function (fnTally)

    I think it comes down to a balance between performance and management. Sure, your proposal to have a slew of functions to fit various criteria would work and would likely...

  • Reply To: Create a Tally Function (fnTally)

    No worries, Jeff. I also use the first one most primarily (99+%) with only a few use cases for the offset one. You got me to thinking about the UNION...

  • Reply To: Create a Tally Function (fnTally)

    Hi Jeff! Here's a version that I've used for a while that's been pretty handy for me:

    CREATE FUNCTION dbo.fnTally(@RowCnt bigint, @ZeroOrOne bit = 1)
    RETURNS TABLE WITH SCHEMABINDING
    AS...
  • Reply To: What Keeps You Employed?

    I have used the analogy of medical doctors before to describe the different fields within the computing space. It does help people to recognize that there is quite a bit...

  • Reply To: Strange Sorting

    I thought the same thing initially, but it won't work because DATEPART(mm,oh.OrderDate) is not part of the GROUP BY whereas DATENAME(mm,oh.OrderDate) is.

  • Reply To: Strange Sorting

    Arg! I clicked the wrong one! I got so excited because I new that it would list it by month name yet be in the proper order (month number). This...

  • Reply To: Dos and Don'ts of Dynamic SQL

    Great article Thom! I've been working on a SQL Saturday presentation right along these lines. There were a couple of points that I'd like to include in my presentation with...

  • Reply To: Give Hugs

    This post was a great recognition to those who travel extensively and the impact that it has on them and their family. For a period of time, I figured that...

  • Reply To: Computer Disruptions

    Good morning Steve! When travel becomes a weekly issue with multiple legs on the journey, such scheduling issues can indeed become a major problem. I figured out one time that...

  • RE: How Long is Too Long?

    I tend to agree with Jeff in that the length of the presentation depends on the subject and the required depth of discussion needed for it to be properly understood....

  • RE: Who should have Sysadmin rights?

    Len.Geoghegan - Monday, March 11, 2019 7:18 AM

    Seems to me that a user should have access with minimum privileges through standard login,...

Viewing 15 posts - 76 through 90 (of 386 total)