SQL 2005 Get Roles, Schemas & Object Permissions
Pulls all DB/Server fixed roles, default schemas & object permissions for all logins
2008-11-28 (first published: 2008-10-25)
2,419 reads
Pulls all DB/Server fixed roles, default schemas & object permissions for all logins
2008-11-28 (first published: 2008-10-25)
2,419 reads
Often during the development lifecycle columns are added to tables that become redundant or remain unused.
this script removes unused (empty) columns
2008-11-27 (first published: 2008-10-22)
1,196 reads
Get the all the SQL Server related services information,
2008-11-26 (first published: 2008-10-13)
1,288 reads
2008-11-25 (first published: 2008-10-20)
1,341 reads
This is related to my other autogenerate code. this is just an example of how to use it.
2008-11-21
790 reads
use metadata to generate basic create procedure statements for insert update and select
2008-11-21 (first published: 2008-10-10)
3,864 reads
2008-11-20 (first published: 2008-10-06)
1,000 reads
this is a MUCH simpler method of random randomize randomise rand data from a table
2008-11-19
314 reads
Find indexes associated with queries and vice versa. Helps figure out what procedures are using indexes.
2008-11-18 (first published: 2008-07-31)
1,724 reads
Script to found out how much time before Restore or Backup Process remain
2008-11-17 (first published: 2008-09-30)
1,071 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