Viewing 15 posts - 91 through 105 (of 402 total)
The "correlation" is that for every row in Table A, something (Action A) will be done with it (more like an OUTER APPLY because of the "every row" comment). ...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
August 30, 2019 at 2:45 pm
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...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
August 30, 2019 at 4:46 am
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...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
August 30, 2019 at 4:32 am
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...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
August 29, 2019 at 2:30 pm
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...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
August 14, 2019 at 5:21 pm
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...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
August 14, 2019 at 4:28 pm
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...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
August 13, 2019 at 9:20 pm
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...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
August 13, 2019 at 5:40 pm
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...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
May 24, 2019 at 2:18 pm
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.
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
May 9, 2019 at 6:02 pm
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...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
May 9, 2019 at 4:11 pm
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...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
April 29, 2019 at 2:51 pm
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...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
April 26, 2019 at 6:53 pm
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...
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
April 11, 2019 at 2:03 pm
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....
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
March 15, 2019 at 8:58 am
Viewing 15 posts - 91 through 105 (of 402 total)