Shhhh!! Be vewy, vewy quiet. I'm hunting Select *!!
Who's bad?
"Select *" is bad. Everyone knows it, but everyone still uses it. I use it. Most of the time it...
2008-03-28
1,538 reads
Who's bad?
"Select *" is bad. Everyone knows it, but everyone still uses it. I use it. Most of the time it...
2008-03-28
1,538 reads
"Select *" is bad. Everyone knows it, but everyone still uses it. I use it. Most of the time it is...
2008-03-28
1,453 reads
How do you know what procedures are cached in SQL Server? Simple, just ask, and SQL Server will tell you.You...
2008-03-28
1,484 reads
Here's a good article on setting up Deadlock Notifications in SQL Server 2005 written by Patrick LeBlanc.
2007-10-16
1,491 reads
Q I need an easy way to see if a delete transaction has fired a trigger. Do you have any...
2007-08-01
638 reads
Breaking Up is Easy to DoHardIt's nice to be able to package a process into a single, tidy, elegant query,...
2007-07-03
640 reads
Some of you younger DBA’s out there may not know who Neil Sedaka is or remember his poignant words "Breaking...
2007-07-03
630 reads
The active SQL Server error log is one of the first places people look when there is a problem. For...
2007-06-29
1,608 reads
No, I'm not going to keep making corny references to war and being a soldier. But in many ways, we...
2007-06-29
1,355 reads
Checks the default file locations for your data and log files. If not set, it sets them to the specified values. This is written for a SQL 2005 default instance. Registry paths may be different for SQL 2000 or named instances.The script can be easily modified to update it if the current value is set […]
2007-01-01 (first published: 2006-12-21)
919 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