2007-10-24
4,729 reads
2007-10-24
4,729 reads
What is the best way to return the "duration" of an event in SQL, given the start and end datetime values? How can we add up these durations to return grand totals? What data types should be used to return this data to our clients? How do we handle overflows, such as when hours go over 23 or minutes total up to over 59? Are there any T-SQL functions or other techniques that are useful in these scenarios?
2007-10-24
4,455 reads
A look at how constants are used in T-SQL and SQL Server in general along with some suggestions on how better to deal with them.
2007-10-16
7,945 reads
This little script will search for all matching tables on the SQL Server instance
2008-07-30 (first published: 2007-10-15)
749 reads
Sometimes you need to empty the content of database. Following script can do that for you.
2007-10-15
4,866 reads
A function to replace tab characters with the correct number of spaces to align the text as originally intended.
2011-09-29 (first published: 2007-10-11)
2,210 reads
Most DBAs don't ever deal with multiple languages or different collation and sort order settings in SQL Server, but it can be a handy piece of information to have. Steve Jones brings us a quick look at a problem in comparing data across databases.
2007-10-11
11,089 reads
2013-10-22 (first published: 2007-10-10)
30,310 reads
2007-10-08
4,292 reads
This script will delete all rows from the database, except system tables.
2007-11-26 (first published: 2007-09-30)
1,701 reads
By ChrisJenkins
Do you spend so long manipulating your data into something vaguely useful that you...
By Steve Jones
It was neat to stumble on this in the book, a piece by me,...
Forgive me for the title. Mentally I’m 12. When I started my current day...
Comments posted to this topic are about the item Microsoft Security Changes and SQL...
Comments posted to this topic are about the item Expanding into Print
Comments posted to this topic are about the item Downtime Caused by the Postgres...
In SQL Server 2025, what is returned by this code:
SELECT EDIT_DISTANCE('Steve', 'Stan')
Assume preview features are enabled. See possible answers