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
163 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
163 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
335 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
788 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,610 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,064 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,208 reads
2002-04-01
691 reads
2002-04-01
780 reads
This script would help you find users, their logins, roles etc in a database.
2002-04-01
346 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
218 reads
By Steve Jones
With the AI push being everywhere, Redgate is no exception. We’ve been getting requests,...
By Steve Jones
fawtle – n. a weird little flaw built into your partner that somehow only...
AWS recently added support for Post-Quantum Key Exchange for TLS in Application Load Balancer...
Comments posted to this topic are about the item Where Your Value Separates You...
Comments posted to this topic are about the item Fixing the Error
Comments posted to this topic are about the item T-SQL in SQL Server 2025:...
On SQL Server 2025, I have a database that has this collation: SQL_Latin1_General_CP1_CI_AS. I decide I want to run this code:
SELECT UNISTR('*3041*308A*304C*3068 and good night', '*') AS 'A Classic';
I get this error:Msg 9844, Level 16, State 4, Line 24 The char/varchar input type uses an unsupported collation. Only a UTF8 collation is supported with char/varchar input type in UNISTR function.What is the easiest way to fix this error? See possible answers