Tables referenced by a stored proc (2000)
This should find all tables referenced by an sp. It uses syscomments and hence has a wrap 'issue'.
2008-12-30 (first published: 2008-12-05)
1,058 reads
This should find all tables referenced by an sp. It uses syscomments and hence has a wrap 'issue'.
2008-12-30 (first published: 2008-12-05)
1,058 reads
we need change all user table db owners For selected database using T SQL we can easily use this method.
2008-12-29 (first published: 2008-11-30)
1,243 reads
Capturing the execution time for rebuilding an index for set of tables.
2008-12-26 (first published: 2008-11-27)
1,733 reads
This article explains a simple solution for the common problem in MSSQL 7.0/2000, finding & deleting duplicate records from a table.
2008-12-24 (first published: 2008-11-26)
2,838 reads
2008-12-23 (first published: 2008-11-10)
2,965 reads
i have recently had the need to search the every database on the server for a particular string.
i came up with this... it has lots of room for improvement but it works
2008-12-19 (first published: 2008-11-11)
1,025 reads
I couldn't find a solid script for this so I put this together. It creates the database EXACTLY as it was with growth and proper file groups.
2008-12-18 (first published: 2008-11-14)
1,287 reads
2008-12-17 (first published: 2008-11-10)
2,708 reads
2008-12-17
118 reads
Save the transaction log and truncate the file to prevent Tlogs FULL Error
2008-12-16 (first published: 2008-11-17)
2,715 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