T-SQL

Technical Article

Working with Time Spans and Durations in SQL Server

  • Article

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?

(3)

You rated this post out of 5. Change rating

2007-10-24

4,455 reads

SQLServerCentral Article

Collation Error 468

  • Article

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.

(22)

You rated this post out of 5. Change rating

2007-10-11

11,193 reads

Blogs

Introducing azsql-migration-test: Test and Validate Azure SQL Database Migrations

By

Introducing azsql-migration-test, a small open-source CLI that validates your Azure SQL Database migrations against...

Rambling about Data on Wheels – origins, branding, expansion

By

I have been asked many times about how the name “Data on Wheels” came...

Think Twice Before Enabling Fabric’s Inbound Network Protection

By

Fabric inbound network protection involves two tenant-level controls: Private Link and Block Public Internet...

Read the latest Blogs

Forums

Alamat Kontak Bank BCA KCP Riau Telp:08218154392

By Layanan_24jam

WA CS (08218154392) Jl. Laks Jl. L. L. R.E. Martadinata No.92, Cihapit, Kec. Bandung...

Alamat Kontak Bank BCA KCP Banda Telp:08218154392

By layanan 24jam BCA

WA CS (08218154392) Jl. Banda No.39, Citarum, Kec. Bandung Wetan, Kota Bandung, Jawa Barat...

Make It Routine

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Make It Routine

Visit the forum

Question of the Day

DBCC CHECKDB Limits III

On SQL Server 2025, does DBCC CHECKDB support Memory-Optimized tables?

See possible answers