SQL Server function to convert integer date to datetime format
In this tip we look at code you can use to convert an integer date into a datetime format. This is an issue you will face when working the history data for SQL Server Agent Jobs.
In this tip we look at code you can use to convert an integer date into a datetime format. This is an issue you will face when working the history data for SQL Server Agent Jobs.
As database changes are added to the DevOps pipeline, unit testing of those changes becomes crucial. In this article, Adam Hafner describes unit testing and how it applies to databases.
Comments in code can be tricky, but certainly some are better than others. What are your bad examples?
In this tip we look at a script to find SSIS packages that are stuck executing and how to end the package execution.
In this tip we look at some of the advantages and disadvantages of using triggers in SQL Server.
Introduction TOP is one of the many syntactical operators available in T-SQL and at a first view, it could seem very simple and not particularly interesting. According to the official documentation, it “limits the rows returned in a query result set to a specified number of rows or percentage of rows”. The following is the […]
This Friday's poll looks at the time after deployment. Can you tell if things were successful? Do you have a formal way to determine if the changes are causing issues?
Learn how to remove gaps in Identity values in SQL Server caused by Identity Cache.
Phil Factor demonstrates how to use SQL Clone to create 'disposable' SQL Server databases, for development and testing work. You can spin up a clone, use it to unit test your code, messing up the clone in the process, then reset the clone in seconds, ready for the next test.
In this tip we look at how to use Common Table Expressions CTE in SQL Server including the syntax, use cases, using more than 1 CTE at the same time and recursive CTEs with a parameter.
Every organization I talk to has the same problem dressed up in different clothes....
By DataOnWheels
I am delighted to host this month’s T-SQL Tuesday invitation. If you are new...
By alevyinroc
Ten years (and a couple jobs) ago, I wrote about naming default constraints to...
Comments posted to this topic are about the item The day-to-day pressures of a...
Comments posted to this topic are about the item Using OPENJSON
Comments posted to this topic are about the item Data Modeling with dbt for...
I have some data in a table that looks like this:
BeerID BeerName brewer beerdescription 1 Becks Interbrew Beck's is a German-style pilsner beer 2 Fat Tire New Belgium Toasty malt, gentle sweetness, flash of fresh hop bitterness. 3 Mac n Jacks Mac & Jack's Brewery This beer erupts with a floral, hoppy taste 4 Alaskan Amber Alaskan Brewing Alaskan Brewing Amber Ale is an "alt" style beer 8 Kirin Kirin Brewing Kirin Ichiban is a Lager-type beerIf I run this, what is returned?
select t1.key
from openjson((select t.* FROM Beer AS t for json path)) t1 See possible answers