Calculate Age (in years)
An inline table valued function (iTVF) that can be used to calculate age in years.
2016-04-27 (first published: 2016-04-06)
1,105 reads
An inline table valued function (iTVF) that can be used to calculate age in years.
2016-04-27 (first published: 2016-04-06)
1,105 reads
Function do return common datatime formats of a date.
select dbo.[KDT_FN_FORMATDATETIME]('LASTDAY DDDD',getdate())
2016-04-26 (first published: 2016-03-29)
1,671 reads
Determine what day easter sunday will be based upon the year you pass the function
2016-04-25 (first published: 2016-03-30)
493 reads
If you have job that opens a transaction and hangs too long causing a Prod issue this will be a big help to let you know.
2016-04-22 (first published: 2016-03-30)
727 reads
This is an version independent stored procedure to get the backup date from a backup file.
It's tested for SQL 2005, 2008(R2), 2012 and 2014.
Consider it a template to which you can add more output parameters from the headerinfo to meet your requirements.
2016-04-21 (first published: 2016-03-31)
387 reads
A stored procedure to generate database file moves along with Robocopy script and the attach / detach scripts
2016-04-20 (first published: 2016-04-04)
678 reads
A brand new, high-performing, "GetNumbers" or "fnTallyTable" function that can be used for defeating RBAR.
2016-04-19 (first published: 2016-03-23)
1,460 reads
This stored procedure will show all possible datetime formats when used with the style argument in the CONVERT() function. It also shows sample output from the date part arguments.
2016-04-13 (first published: 2014-10-10)
2,522 reads
2016-04-12 (first published: 2014-03-12)
2,408 reads
Generates Scripts to move DB files from one location to another SQL and powershell scripts
2016-04-11 (first published: 2014-03-19)
4,315 reads
By James Serra
Making Data AI-Ready, Part 1 (This is the first article in a three-part series...
By Steve Jones
Thanks for attending my sessions. Resources below: Slides: Using Data API Builder GitHub repo: ...
By Steve Jones
Thanks to everyone that attended my sessions at VS Live San Diego yesterday. It...
When I run my query from DW, which uses a linked server, it times...
Comments posted to this topic are about the item Implementing Type 4 Slowly Changing...
Comments posted to this topic are about the item The Disabled Index
I run this code on SQL Server 2022.
CREATE TABLE Drink
(
drinkid INT NOT NULL
CONSTRAINT DrinkPK PRIMARY KEY CLUSTERED,
drinkname VARCHAR(20),
rating NUMERIC(2, 1)
)
GO
INSERT INTO Drink
(
drinkid,
drinkname,
rating
)
VALUES
(1, 'Margarita', 4.5),
(2, 'Mojito', 4.3),
(3, 'Old Fashioned', 4.7),
(4, 'Martini', 4.4),
(5, 'Cosmopolitan', 4.2)
GO
ALTER INDEX drinkpk ON dbo.drink DISABLE
GO
SELECT * FROM dbo.Drink
GO
What is the result? See possible answers