Finding the first day of the Month
This script derives the first day of the month and the last day of the previous month...
2002-04-04
456 reads
This script derives the first day of the month and the last day of the previous month...
2002-04-04
456 reads
Have you faced a situation where you want to have the latest currency rates available upto a particular date. Normally you may have to run sub queries but derived tables is the easiest way to do.
2002-04-04
316 reads
The fastest way of getting LastDayPreviousMonth / FirstDayCurrentMonth
2002-04-04
209 reads
Sample script header to use to describe a stored procedure. This is a piece of the one I use but needs modification for each environment.
2002-04-04
1,260 reads
This procedure will let you execute existing stored procedure with several sets of multiple parameters like: exec _ParamSplit_SP 'ColorSP', "258,'RED';367,'BLUE';125,'GREEN'",";" it will be the same as exec ColorSP 258,'RED' exec ColorSP 367,'BLUE' exec ColorSP 125,'GREEN'Created for SQL 7
2002-04-03
878 reads
The script calculates the end and the beginning of the last, the current and the next months.
2002-04-01
1,018 reads
2002-04-01
794 reads
This script would help find primary key, foriegn key, unique constraints, check constraints on a table. With slight modification you can use it to find various information about a table.
2002-04-01
607 reads
2002-04-01
707 reads
This script would help you find users, their logins, roles etc in a database.
2002-04-01
361 reads
By Steve Jones
Thanks to everyone that attended my sessions at VS Live San Diego yesterday. It...
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...
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