Insert Commas Into Number String
Function to take a number as a string and return it with commas separating thousands, millions, etc.
2013-06-07 (first published: 2009-03-31)
2,435 reads
Function to take a number as a string and return it with commas separating thousands, millions, etc.
2013-06-07 (first published: 2009-03-31)
2,435 reads
2013-06-06 (first published: 2009-03-16)
2,650 reads
Ever wondered what got restored, who did the restore and where the backup came from that did the restore?
2013-06-04 (first published: 2012-08-23)
2,033 reads
Use sp_MSForeEachDB to set all 1 MB file growth databases to 10%.
2013-05-31 (first published: 2012-11-10)
1,464 reads
Need to find every stored procedure in any database that references the table FooBar? Here is a quick and easy search to do that.
2013-05-30 (first published: 2013-05-22)
1,752 reads
This is a stored procedure which can be used to find which processes are been blocked by each other. This Procedure will also provide SQL information associated with the blocked SPID.
2013-05-23 (first published: 2009-06-15)
2,849 reads
This script is helpful to identify the orphaned users in a database, useful when we restore a database from a different location.
2013-05-22 (first published: 2008-07-20)
2,695 reads
Get a distinct list of file names from a table into an ArrayList and compare against a remote FTP server. Retrieve only the files that have not already been processed into the database.
2013-05-17 (first published: 2008-09-11)
2,891 reads
The non-SSIS/GUI method I use to deploy standardized Database Maintenance Plans.
2013-05-16 (first published: 2009-05-07)
4,398 reads
If you ever need a quick way to generate random passwords, this is a pretty useful way to do so.
2013-05-15 (first published: 2008-09-24)
3,366 reads
By Steve Jones
I recently started playing with the MCP Server for SQL Server, which is a...
If you spend your days tuning queries, managing pipelines, or keeping a production database...
I’ve been rebuilding my three-site SQL Server demo lab, and I ran into something...
Has anyone written a wrapper function (or similar) around STRING_AGG() to allow the retrieval...
Putting this here as we're currently on SQL Server 2019 installed on Windows Server...
Comments posted to this topic are about the item Never is Not the Policy
I have added a few indexes to one of my tables in SQL Server 2025:
ALTER TABLE dbo.CustomerContact
ADD CONSTRAINT PK_CustomerContact
PRIMARY KEY (CustomerID);
-- Create index on CustomerEmail
CREATE INDEX IX_CustomerContact_CustomerEmail
ON dbo.CustomerContact (CustomerEmail);
CREATE INDEX IX_CustomerContact_CustomerPhone
ON dbo.CustomerContact (phone);
I then do this to disable one index:
alter index IX_CustomerContact_CustomerPhone on dbo.CustomerContact disableI see this when I check the index status:
I decide to rebuild all indexes with this command:
ALTER INDEX ALL ON dbo.CustomerContact rebuildAfter I do this, what will I see for the index status? See possible answers