Grant Fritchey

Grant Fritchey is a SQL Server MVP with over 20 years’ experience in IT including time spent in support and development. Grant has worked with SQL Server since version 6.0 back in 1995. He has developed in VB, VB.Net, C# and Java. Grant has authored books for Apress and Simple-Talk, and joined Red Gate as a Product Advocate in January 2011. Find Grant on Twitter @GFritchey or on his blog as the Scary DBA.

SQLServerCentral Editorial

The Yutes

I recently had the opportunity to talk a little PostgreSQL with the Salt Lake City PostgreSQL Meetup group (thank you for having me by the way). Great bunch of people who were really engaged and asked a lot of questions. On the way out of the event, I was chatting with one person (who had […]

5 (1)

You rated this post out of 5. Change rating

2025-09-13

189 reads

SQL Server 2022 Query Performance Tuning

Troubleshoot slow-performing queries and make them run faster. Database administrators and SQL developers are constantly under pressure to provide more speed. This new edition has been redesigned and rewritten from scratch based on the last 15 years of learning, knowledge, and experience accumulated by the author. The book Includes expanded information on using extended events, automatic execution plan correction, and other advanced features now available in SQL Server.

You rated this post out of 5. Change rating

2025-08-08 (first published: )

1,063 reads

SQLServerCentral Editorial

Hack Your Brain

Now, let's be really clear up front, I don't mean getting a surgically implanted chip in your head, done on your kitchen table. Brain hacks are generally either, forming habits that are good for learning and concentration, changing how you do things to help enhance your brains function, eating differently in support of brain health, […]

You rated this post out of 5. Change rating

2025-08-02

104 reads

Blog Post

Slide Decks

Hello everyone! Just a quick note. I’ve removed all my slide decks from SlideShare. I found they were inserting ads into the slides and I didn’t sign up for...

2025-08-02

23 reads

SQLServerCentral Editorial

Get Your Chores Done

I grew up in a pretty rural environment, in the southern US, in what's considered the Old West (Jesse James, reportedly, had a hideout a few miles from my current home, the Daltons, Belle Star, I can keep going, all came through this part of Oklahoma). Here, we call our daily tasks, like taking out […]

You rated this post out of 5. Change rating

2025-08-01

88 reads

SQLServerCentral Editorial

A Little Appreciation

I'd like to take a moment and simply voice my appreciation for Steve Jones. Steve's still on sabbatical, so I've been doing some of the work, along with my co-worker, Kellyn Gorman (who I also appreciate, very much). I'm sure you've noticed. Oh, not simply that the editorials are different. That's to be expected. Nah, […]

5 (5)

You rated this post out of 5. Change rating

2025-07-30

98 reads

SQLServerCentral Editorial

Planning for the Right Emergency Response

I'm currently testing a pair of POC radios <editor: can no one shut him up about the radios?> No, go away. So, where was I, oh yeah, POC radios. What are they, I hear you asking. <editor: no one asked that> Hush. Push-to-talk Over Cellular. POC or PoC. In short, you get a SIM card […]

5 (1)

You rated this post out of 5. Change rating

2025-07-28

76 reads

SQLServerCentral Editorial

Life's Little Frustrations

As with others, I've had to deal with death in the family recently. Some other family members are dealing with cancer (a few friends too). Happily none of us has recently been a disaster zone, but that's happened too. So yeah, big, nasty scary stuff happens in life. However, for most of us, most of […]

You rated this post out of 5. Change rating

2025-07-19

87 reads

SQLServerCentral Editorial

Databases and Disasters

I was just reading about how the Philippines are working to update their databases in support of faster and better responses in the case of an emergency. While I do volunteer for some of the local emergency services, I'm right at the bottom of the heap as just a radio operator. I don't have any […]

5 (2)

You rated this post out of 5. Change rating

2025-07-18

109 reads

Blogs

Troubleshooting TempDB Log Full Errors When SSMS Won’t Connect

By

Have you ever received the dreaded error from SQL Server that the TempDB log...

Accelerating AI with Confidence: Why Microsoft Purview is Key to Responsible Innovation

By

Artificial intelligence is no longer a distant concept. It is here, embedded in the...

The Mystery of SQL Server 2025’s New Tricks – Scooby Dooing Episode 5

By

Every Scooby-Doo mystery starts with a haunted house, a strange villain, and a trail...

Read the latest Blogs

Forums

Is there some good routines for updating SQL Server database objects with GitHub

By Rod at work

At work we've been getting better at writing what's known as GitHub Actions (workflows,...

The Tightly Linked View

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Tightly Linked View

Build a Test Lab of SQL Server 2025 on Windows Server 2025 using Hyper-V Virtual Machines

By Aleksey Vitsko

Comments posted to this topic are about the item Build a Test Lab of...

Visit the forum

Question of the Day

The Tightly Linked View

I try to run this code on SQL Server 2022. All the objects exist in the database.

CREATE OR ALTER VIEW OrderShipping
AS
SELECT cl.CityNameID,
       cl.CityName,
       o.OrderID,
       o.Customer,
       o.OrderDate,
       o.CustomerID,
       o.cityId
 FROM dbo.CityList AS cl
 INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID
GO
CREATE OR ALTER FUNCTION GetShipCityForOrder
(
    @OrderID INT
)
RETURNS VARCHAR(50)
WITH SCHEMABINDING
AS
BEGIN
    DECLARE @city VARCHAR(50);
    SELECT @city = os.CityName
    FROM dbo.OrderShipping AS os
    WHERE os.OrderID = @OrderID;
    RETURN @city;
END;
go
What is the result?

See possible answers