Unexpected truncation in FETCH
Yes I’m talking about FETCH as in a cursor, yes everyone hates cursors. But you know cursors are like anything...
2013-10-23
731 reads
Yes I’m talking about FETCH as in a cursor, yes everyone hates cursors. But you know cursors are like anything...
2013-10-23
731 reads
Everyone knows that we should include comments in our code right? On the other hand the vast majority of us...
2013-10-29 (first published: 2013-10-21)
1,763 reads
We have a set of databases at my office that use the load and swap method of loading data with...
2013-10-16
1,214 reads
Personally I’ve always enjoyed learning the T-SQL for any given task. The GUI is usually pretty easy to figure out...
2013-10-14
1,020 reads
This happens to me all the time. I get a request from a developer to overwrite the test copy of...
2013-10-16 (first published: 2013-10-09)
2,674 reads
It’s time for T-SQL Tuesday again and this time Kendal Van Dyke is asking for Your Best SQL Server SWAG....
2013-10-08
759 reads
Both TOP and SET ROWCOUNT are both valid methods of limiting the result sets from a query. They are however...
2013-10-10 (first published: 2013-10-07)
3,986 reads
I absolutely love learning new tricks that can be done in SSMS. Everything from opening initial connections to both the...
2013-10-02
900 reads
What the heck? Even indexes have WHERE clauses these days. I can’t remember what I was reading when I saw...
2013-09-30
1,368 reads
In my general quest to figure out the T-SQL to do common GUI tasks I did some browsing through BOL...
2013-10-01 (first published: 2013-09-26)
1,667 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