Calendar Table Function
This iTVF will produce a calendar table that can be used for complex date manipulation; quickly and effeciently
2016-08-02 (first published: 2014-12-29)
8,596 reads
This iTVF will produce a calendar table that can be used for complex date manipulation; quickly and effeciently
2016-08-02 (first published: 2014-12-29)
8,596 reads
Identify the current statement and its line number within a running batch. Includes a link to the execution plan, if available.
2016-08-01 (first published: 2015-03-03)
5,455 reads
This script reports jobs which are running when another job is also running. This could be a reason for performance degradations.
2016-07-29 (first published: 2014-06-21)
2,684 reads
A script we use in our company, that rebuilds online=on by default, but takes care of special exceptions.
2016-07-28 (first published: 2014-06-06)
2,393 reads
Based upon todays date as suffix and chosen string as prefix, select data from predefined table into dynamically named new table. Script is properly error handled with most common errors
2016-07-27 (first published: 2015-05-04)
2,612 reads
2016-07-26 (first published: 2014-11-20)
2,260 reads
This script alert when a table on a DB has a low number of identities available
2016-07-25 (first published: 2016-07-16)
546 reads
This script will generate 5 lottery numbers plus one mega and you can set how many tickets and the range for the numbers for the different types of lotteries.
2016-07-22 (first published: 2016-07-13)
2,094 reads
standard missing index script but has a create statement to copy and past
2016-07-21 (first published: 2016-07-07)
2,155 reads
Capture Linux Drive Space data with Powershell using Posh-SSH module
2016-07-19 (first published: 2016-07-06)
1,280 reads
By Steve Jones
I was creating a question on sp_readerrorlog and realized that this procedure is different...
By SQLPals
Why sys.fn_dblog Is Undocumented And Why It's Still There Why sys.fn_dblog...
When I put together the invitation for T-SQL Tuesday #202, I wasn't sure what...
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
Comments posted to this topic are about the item Server-Level Table sizes
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