Delete files older than n-days via T-SQL
Delete files on a fileshare leaving behind files not older than n-days.
2011-09-13 (first published: 2008-04-02)
10,099 reads
Delete files on a fileshare leaving behind files not older than n-days.
2011-09-13 (first published: 2008-04-02)
10,099 reads
2008-03-21
4,416 reads
Creates a resultset that expresses the last time a successful CHECKDB was performed on every database in the instance.
Does not work on SQL 2000.
2011-09-28 (first published: 2008-03-19)
5,167 reads
A brief introduction into the world of scalability, presenting at a high-level the various options
2008-03-19
2,106 reads
2008-03-17
7,722 reads
2012-01-06 (first published: 2008-02-15)
7,328 reads
Learn how to change a group of SQL Server stored procedures (SPs) that perform tasks in your databases. Edit SQL Server SPs at one time with these steps.
2008-02-12
4,317 reads
Determine accurate storage requirements for a SQL Server database with these methods. Calculate how to set storage requirements for a database application.
2008-02-04
4,540 reads
Buck Woody discusses the hard-earned knowledge and experience that you'll need to gain in order to stand out as a and professional and exceptional DBA.
2007-12-31
8,107 reads
Generate the scripts that will allow you to compare tables pass/fail.
2011-09-07 (first published: 2007-12-28)
12,629 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