Table of Numbers
A user-defined function that returns a table of numbers between a and b (using the most efficient way I can think of).e.g. select * from table_of_numbers(1, 4) gives a table with rows 1, 2, 3 and 4.
2002-05-09
193 reads
A user-defined function that returns a table of numbers between a and b (using the most efficient way I can think of).e.g. select * from table_of_numbers(1, 4) gives a table with rows 1, 2, 3 and 4.
2002-05-09
193 reads
This function takes a number of Seconds in BIGINT format and calculations and displays that in a DDD:HH:MM:SS format.I wrote this because I needed to work out the duration between two datetimes and required the result to be displayed in a Report (VARCHAR (12)) format from a Select statementTo Use:SELECT dbo.csp_SecondsToDaysHoursMinutesSeconds(DATEDIFF(SS, , )) AS DurationFROM […]
2002-05-09
365 reads
This script is designed to eliminate weekends and designated non business days (such as holidays and other days a company is closed) from a computation to determine if a particularorder was shipped on time, early, or late.
2002-05-01
815 reads
This script will be helpful to only those people who arehaving identical database with different names.This script can be used to copy single or multiple tables from one database to anotherThe parameters @tname , source database and target database are important for the script to work. In the script below I have considered two databases […]
2002-04-16
1,628 reads
A Modified Version of dateDiff. DateDiff Fucntion checks the "datepart" only of the dates. This modified function returns how many "date part" is exactly passed.
2002-04-08
1,096 reads
Sample script header to use to describe a stored procedure. This is a piece of the one I use but needs modification for each environment.
2002-04-04
1,268 reads
2002-04-01
716 reads
2002-04-01
805 reads
This script would help you find users, their logins, roles etc in a database.
2002-04-01
373 reads
Under special circumstances, it could happen that database contains "orphan" records. Data in dependant table exists without it's "parent" record in a master table. It could be caused by a bulk insert operation without CHECK_CONSTRAINTS option, or by disabling foreign key for a while or adding a foreign key to a table that already contains […]
2002-03-27
252 reads
By James Serra
If you are migrating a data warehouse, there is a question worth asking before...
By Steve Jones
I’m back from a great vacation. I had the chance to visit two new...
Introduction I was experimenting with vector search in SQL Server 2025 using approximately 3.8...
Comments posted to this topic are about the item DML Trigger Types
Comments posted to this topic are about the item PostgreSQL in action with Opensearch
Comments posted to this topic are about the item Choose the Second One
How many types of DML triggers are there?
See possible answers