Manually updating Statistics
Having up to date statistics is vital for getting the best performance out of your queries. Even though SQL Server automatically updates statistics in the background for you, you...
2021-02-16
222 reads
Having up to date statistics is vital for getting the best performance out of your queries. Even though SQL Server automatically updates statistics in the background for you, you...
2021-02-16
222 reads
I am working on an Azure SQL Database migration from an on-premises VM, and at the client's request I am working through the BACPAC Import/Export process rather than using...
2021-02-16 (first published: 2021-02-08)
328 reads
This is a post that looks at how to compare data changes in recent data. A customer recently asked me about looking at a table, and choosing specific data...
2021-02-16 (first published: 2021-02-08)
274 reads
(2021-Feb-07) "You've Got a Friend in Me" is a well-known song written by Randy Newman and featured in one of Disney's animated films. If I hadn't had a chance...
2021-02-15 (first published: 2021-02-07)
212 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2021-02-15
12 reads
There are three ways to get into bash in a docker container: docker exec -it containername bash docker exec -it containername “bash” docker exec -it containername /bin/bash Once you...
2021-02-15
21 reads
If you have a SQL Server Availability Group (AG) and the VMs are being replicated to a disaster recovery site (cloud or on-prem), chances are the networking topology is...
2021-02-15 (first published: 2021-02-08)
306 reads
I will be presenting my session “Backup Basics with PowerShell and dbatools” this Thursday, February 18th at 2:30 PM Central Time at the Kansas City SQL Server User Group....
2021-02-15
3 reads
In this post, I’m going to show you how to install containerd as the container runtime in a Kubernetes cluster. I will also cover setting the cgroup driver for...
2021-02-14
3 reads
When you use ADF, there are two sides to the coin. The first is the data itself that ADF does very well, from moving it from one site to...
2021-02-12
18 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...
At work we've been getting better at writing what's known as GitHub Actions (workflows,...
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...
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