Simpler First/Last Day of Months
Script uses simpler Dateadd function ensuring additions/substractions are based from 1st of month.
2005-01-03 (first published: 2004-12-02)
159 reads
Script uses simpler Dateadd function ensuring additions/substractions are based from 1st of month.
2005-01-03 (first published: 2004-12-02)
159 reads
I wanted to know which tables contains the most populated records in db. So I wrote this script.
2005-01-02 (first published: 2004-11-18)
129 reads
It is often necessary to generate a table with sequential numbers, up to a specified upper limit N. For small N, a simple INSERT in a WHILE loop will do. But, for large N, that solution becomes too slow. This script presents a different approach. It generates sequential numbers from the binary representation of N, […]
2004-12-30 (first published: 2003-11-24)
669 reads
This function will calculate the number of weekdays between two dates passed. This allows for accurate tracking of "business days" for metrics in many different views.
2004-12-28 (first published: 2004-12-16)
288 reads
To examine all the properties of a database is time consuming. The following script gives you a quick overview of the most important properties of all the databases on your SQL Server.
2004-12-27 (first published: 2004-12-10)
688 reads
Inspired by a post here at SQLServerCentral, I wrote this function to calculate the number of days between two dates that are weekdays. In order to achieve this I used a common SQL table that contains a sequence of number for 1 to X. This was used as an input to the datediff function, and […]
2004-12-24 (first published: 2004-12-07)
348 reads
The Script outputs all the indexes in the Database.I have used the sp_helpIndex system stored procedure here to retrieve all the indexes available for the Table . This is extremely useful in identifying all the indexes in a database in a single query
2004-12-22 (first published: 2004-11-18)
373 reads
SQL SCRIPT TO AUDIT THE PERMISSIONS FOR OBJECTS IN A DATABASE.
2004-12-21 (first published: 2004-12-06)
459 reads
Here is another variation of processing multiple records with a single procedure call but allowing for set processing.The helper functions make use of the sequencetable pattern. These helper functions can be used to parse strings into records, so one gets a list, or simply return the nth field.There are two functions that will parse into […]
2004-12-17 (first published: 2004-11-05)
815 reads
This script creates a stored proc that was intended to run from a trigger on the master..sysdatabases for each database creation. Alas. It will create three jobs for each database you apply it to. First, it'll create a job to run a full backup each Sun, at 5am (see below). Those backups will be retained […]
2004-12-16 (first published: 2004-11-11)
400 reads
By SQLPals
SQL Server 2016 Has Reached End of Support. Now What? On...
By James Serra
(This post starts a three-part series on how AI is changing the way we...
I built a free library of runnable SQL Server demos. Each reproduces a real...
Comments posted to this topic are about the item Hyperscale Replicas V
Comments posted to this topic are about the item A Heavy Heart
Comments posted to this topic are about the item Calculating Weighted Average in Power...
I have an Azure SQL Database Hyperscale Edition system running with a geo-replica enabled. Can I create a new geo-replica based on the current secondary geo-replica?
See possible answers