DBA 101: Altering a column
People always ask me what tools I use. Mostly this question comes from the topic of monitoring. I can honestly...
2017-02-06 (first published: 2017-02-02)
2,216 reads
People always ask me what tools I use. Mostly this question comes from the topic of monitoring. I can honestly...
2017-02-06 (first published: 2017-02-02)
2,216 reads
Foreign keys are an interesting feature of relational databases. They help enforce data integrity, sometimes help improve performance by eliminating...
2017-01-05 (first published: 2016-12-30)
3,535 reads
I’ve been in technology for twenty years now. I’ve seen hundreds of environments, nearly 300 while employed at Microsoft alone.
One...
2016-12-30
777 reads
I recently worked on a project for fraud. This project needed to relate 67 million accounts to one another “Kevin...
2016-12-27
1,302 reads
I’ve managed to get my hands on a Nintendo NES Classic and I’m going to give it away. The details...
2016-12-13
700 reads
I was building out a blog post about cardinality today and noticed that sys.dm_exec_query_stats was getting cleared my my Surface...
2016-12-27 (first published: 2016-12-08)
1,995 reads
I was recently asked to help tune a stored procedure that has been historically taking between 55 and 60 seconds...
2016-12-15 (first published: 2016-11-30)
4,388 reads
If you’re a DBA or a developer chances are you’ve looked at a query plan or two. While looking at...
2016-11-23 (first published: 2016-11-18)
3,267 reads
If you’re a DBA or database developer, chances are you will have to write or rewrite queries from time to...
2016-11-14 (first published: 2016-11-10)
5,697 reads
Let me start by saying that this isn’t your typical post about the Halloween problem. This is intended to describe...
2016-10-31
978 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...
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...
At work we've been getting better at writing what's known as GitHub Actions (workflows,...
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