SQL Server Diagnostic Information Queries for April 2014
I made some small improvements to a few of the queries this month. I plan to add several more SQL...
2019-04-02 (first published: 2014-04-18)
4,339 reads
I made some small improvements to a few of the queries this month. I plan to add several more SQL...
2019-04-02 (first published: 2014-04-18)
4,339 reads
I have gone through and made some minor updates and bug fixes for all of my SQL Server Diagnostic Information...
2019-04-02 (first published: 2013-08-09)
3,599 reads
Watch this week's video on YouTube
A while back I learned that it's possible to create temporary stored procedures in SQL Server.
I never put that knowledge into practice however because I...
2019-04-02
1 reads
Watch this week's video on YouTube
A while back I learned that it's possible to create temporary stored procedures in SQL Server.
I never put that knowledge into practice however because I...
2019-04-02
2 reads
One of my favorite recent additions to SQL Server is the ability to use temporal tables to retain change history. As I wrote in an earlier post on this...
2019-04-02
125 reads
As we get closer to the end of mainstream support for both SQL Server 2008 and SQL Server 2008 R2...
2019-04-02 (first published: 2014-01-27)
2,467 reads
The use of statistics in SQL Server is tightly embedded in the query optimizer and query processor. The creation and maintenance of statistics is usually handled by the SQL...
2019-04-01
211 reads
The Complaint(s) When I was young, I went to nursing school. In school, we were taught that in order to come up with a proper diagnosis, the doctor first...
2019-04-01
36 reads
An indexed view is a view where the result set from the query (the view definition) becomes materialized in lieu of the virtual table result set of a standard (non-indexed) view. Many...
2019-04-01
2 reads
I was inspired by Jen McCown’s story here. Read that first. It’s WAY better than mine. This is not an April Fools post. Fools are involved, but none were...
2019-04-01
109 reads
By gbargsley
Have you ever received the dreaded error from SQL Server that the TempDB log...
By Chris Yates
Artificial intelligence is no longer a distant concept. It is here, embedded in the...
Every Scooby-Doo mystery starts with a haunted house, a strange villain, and a trail...
Comments posted to this topic are about the item The Tightly Linked View
Comments posted to this topic are about the item Build a Test Lab of...
Comments posted to this topic are about the item Remembering Phil Factor
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; goWhat is the result? See possible answers