Powershell Day 10
Day 10 Working with Directory and Registry As you know, Powershell works with command prompt, and you know it works...
2011-04-10
307 reads
Day 10 Working with Directory and Registry As you know, Powershell works with command prompt, and you know it works...
2011-04-10
307 reads
Day 9 Process and Service Service: For Powershell we can also work with services. You can see which all services...
2011-04-09
379 reads
Day 8 Event Viewver Event log is a very important trace and diagnose the activity on the system. Using Event...
2011-04-08
226 reads
Day 7 – Security With great power comes great responsibility.—Stan Lee, The Amazing Spiderman So far We have discussed simple general...
2011-04-07
222 reads
Day 6 Functions and error handling As everyone aware of what is function, so no need to give therotical infomration...
2011-04-06
227 reads
Day 5 Programming in Powershell Part 3 Now as you know all information, in this blog we will look for...
2011-04-05
351 reads
Day 4 Programming in Powershell Part 2 Now we got some basic information about shell programming operators and other stuff....
2011-04-04
452 reads
Day 3 Programming in Powershell Part 1 Now you got some good basic information about Powershell, and some basic commands...
2011-04-03
1,102 reads
Day 2 Introduction to Windows Powershell. Windows Powershell is a very powerful shell script to interact with windows. Using windows...
2011-04-02
1,475 reads
Day 1 Introduction to Powershell I got inspired by great people like Paul Randal and Glenn Berry and decided to...
2011-04-01
840 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...
Comments posted to this topic are about the item Using CHOOSE()
Comments posted to this topic are about the item Re-Seeding a Broken Log Shipping...
Comments posted to this topic are about the item The DBA is Dead! Long...
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