Why is my pivot query not returning any data? How to debug a PIVOT query
If you have a PIVOT query and it isn’t returning the data you expect, what can you do to troubleshoot it? The thing to do is to break it...
2019-05-21
17 reads
If you have a PIVOT query and it isn’t returning the data you expect, what can you do to troubleshoot it? The thing to do is to break it...
2019-05-21
17 reads
If you have a PIVOT query and it isn't returning the data you expect, what can you do to troubleshoot it? The thing to do is to break it...
2019-05-21
2 reads
How to delete data efficiently When we delete data from a table in SQL Server, we can often find that the delete is slower than even the original insert,...
2019-05-15
329 reads
How to delete data efficiently When we delete data from a table in SQL Server, we can often find that the delete is slower than even the original insert,...
2019-05-15
2 reads
How do you know whether a database code change is going to be great, okay or awful? If you want to test a new version of SQL Server how...
2019-05-08
284 reads
How do you know whether a database code change is going to be great, okay or awful? If you want to test a new version of SQL Server how...
2019-05-08
6 reads
Reading Time: 5 minutes (just do it!)
There is a lot of confusion when it comes to designing tables in SQL Server around whether to pluralize names or not. How...
2019-05-02
13 reads
Reading Time: 5 minutes (just do it!)
There is a lot of confusion when it comes to designing tables in SQL Server around whether to pluralize names or not. How...
2019-05-02
1 reads
Reading Time: 15 minutes (it is quite hard going, but you need to know this if you need to work with the DacFx)
DacFx - Getting the data type of...
2019-04-17
25 reads
Reading Time: 15 minutes (it is quite hard going, but you need to know this if you need to work with the DacFx)
DacFx - Getting the data type of...
2019-04-17
1 reads
You can find the slides of my session on the €100 DWH in Azure...
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...
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