Today with no time portion
How to get current day with the timeportion = 00:00:00.000.Works regardless of locale.
2002-04-05
466 reads
How to get current day with the timeportion = 00:00:00.000.Works regardless of locale.
2002-04-05
466 reads
This script derives the first day of the month and the last day of the previous month...
2002-04-04
463 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
332 reads
The fastest way of getting LastDayPreviousMonth / FirstDayCurrentMonth
2002-04-04
217 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,265 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
886 reads
The script calculates the end and the beginning of the last, the current and the next months.
2002-04-01
1,027 reads
2002-04-01
803 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
615 reads
2002-04-01
715 reads
By Steve Jones
This is timely, as I’m currently on a boat in the Adriatic taking a...
You can find the slides and SQL scripts for my session “Spice up your...
By SQLPals
How to Clear the SSMS Cache (SSMS 21 and Later) Updated...
Telp/Wa 628218200203 Gedung Sutrado, Jl. Kenari 2 No.5 Lt. 1, RT.2/RW.3, Kenari, Kec. Senen,...
Telp/Wa 628218200203 Jl. Biak No.44 AB, RT.8/RW.11, Cideng, Kecamatan Gambir, Kota Jakarta Pusat, Daerah...
Telp/Wa 628217555651 Gedung Plaza Bank Index Ground, Jl. M.H. Thamrin No.57 Floor Suite GF-21,...
We have this code that sets some status values and then queries them using the CHOOSE() function in SQL Server 2025.
CREATE TABLE Status
(
StatusID INT,
StatusDescription VARCHAR(20)
);
GO
INSERT dbo.Status
(
StatusID,
StatusDescription
)
VALUES
(0, 'Uncategorized'),
(1, 'Active'),
(2, 'Inactive'),
(3, 'Temp');
GO
SELECT CHOOSE(StatusID, 'Unknown', 'Active', 'Inactive', 'Temporary')
FROM Status;
When the SELECT runs, what is returned? See possible answers