Synchronize a stored procedure between two servers
Use this stored procedure to synchronize source code of a stored procedure between two servers.
2009-12-11 (first published: 2009-11-26)
2,038 reads
Use this stored procedure to synchronize source code of a stored procedure between two servers.
2009-12-11 (first published: 2009-11-26)
2,038 reads
2009-12-09 (first published: 2009-11-18)
2,104 reads
2009-12-07 (first published: 2009-11-12)
3,100 reads
Generate stored procedure parameter list based on table, useful when creating new SPs on tables with lots of columns.
2009-12-04 (first published: 2009-11-10)
2,123 reads
2009-12-02 (first published: 2009-11-11)
883 reads
Returns the First or last day date of the month for a given date.
2009-12-01 (first published: 2009-11-11)
2,870 reads
Replacement script for usp_ShrinkDBLogs, updates for SQL 2008 deprecating the WITH TRUNCATE_ONLY method.
2009-11-27 (first published: 2009-10-30)
994 reads
Let’s say you have a result set with 5000 records but you want to display only 100 of them and in the same time to display the count of ALL records (5000).
2009-11-20 (first published: 2009-11-05)
2,475 reads
Split string like ('123,43,5465,6788,1231,111', ',') into table, separator (,) can be more than 1 char
2009-11-19 (first published: 2009-11-05)
1,383 reads
Data compression is a key feature with SQL 2008. This script, can compress all DB objects (partition/non-partitioned) according to Partition Range you specifiy.
2009-11-18 (first published: 2009-11-05)
1,178 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