How does Query Store capture cross database queries?
When I was writing my post Capture the most expensive queries across your SQL Server using Query Store a question crossed...
2017-11-16
622 reads
When I was writing my post Capture the most expensive queries across your SQL Server using Query Store a question crossed...
2017-11-16
622 reads
I’ve not done a SQL puzzle for a while so thought it was getting overdue…
I set this one for my...
2019-04-26 (first published: 2017-11-08)
1,450 reads
I’m a big fan of using queries based on the dynamic management view sys.dm_exec_query_stats to capture the most resource hungry...
2019-04-26 (first published: 2017-11-01)
4,919 reads
SQLCMD variables can be a useful way of having changeable parameters for your SQL scripts, allowing you to specify the...
2017-11-01
9,701 reads
In my post about auditing tools in SQL Server I mentioned a few tools we have at our disposal for...
2019-04-26 (first published: 2017-10-24)
4,533 reads
I love the STATISTICS IO and STATISTICS TIME commands. They are such a powerful and easy way to be able...
2017-10-17
500 reads
Unlike some other languages, T-SQL doesn’t have the concept of a constant.
As good coders, we’ve all at some point tried...
2019-04-26 (first published: 2017-10-10)
3,652 reads
As mentioned in my post Auditing Data Access in SQL Server for GDPR Compliance CDC can be a useful tool for...
2017-10-03
16,281 reads
In relation to the GDPR, I’ve recently been looking at the tools available within SQL Server to support auditing our...
2019-04-26 (first published: 2017-09-26)
5,745 reads
We’ve all had to solve deadlock issues. Identify the two conflicting pieces of code, work out an appropriate change to...
2017-09-19
691 reads
By Steve Jones
This value is something that I still hear today: our best work is done...
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...
Hi everyone I am writing an SP where there is logic inside the SP...
Comments posted to this topic are about the item Planning for tomorrow, today -...
We have a BI-application that connects to input tables on a SQL Server 2022...
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