T-SQL aside: replace PRINT with RAISERROR
I was minding my own business innocently reading a blog post by Erik Darling, when this tip smacked me in...
2018-06-06
1,139 reads
I was minding my own business innocently reading a blog post by Erik Darling, when this tip smacked me in...
2018-06-06
1,139 reads
Recently I wrote a post about date and time functions you should never use, which contained an opinion I’ve expressed...
2018-05-30
437 reads
Last week I had the privilege of reviewing possibly the best SQL Server production environment I’ve seen in Canada. During...
2018-05-23
473 reads
Previously we looked at four built-in functions to get the current date and time in SQL Server and Azure SQL...
2018-05-23 (first published: 2018-05-16)
3,880 reads
Thank you! Thank you for reading my blog. Thank you for buying my book. Thank you for attending my sessions...
2018-05-09
244 reads
It occurred to me that we haven’t covered the TIMESTAMP data type in this series about dates and times. TIMESTAMP...
2018-05-02
263 reads
We have come on quite a journey so far. SQL Server and Azure SQL Database provide date and time data...
2018-04-25
385 reads
Last time, we began an in-depth look at how time is measured. This post continues our journey. If any of...
2018-04-18
479 reads
Now that we have covered the various date and time data types (see the post from last time) in SQL...
2018-04-11
851 reads
I will be presenting twice at SQLSaturday #710 in Edmonton, on 5 May 2018. You can join me for two...
2018-04-04
277 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