T-SQL

External 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?

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.

4.14 (22)

You rated this post out of 5. Change rating

2007-10-11

11,019 reads

Blogs

Query Intelligence in SQL Server 2025: What Developers Need to Know

By

When Microsoft announced SQL Server 2025, I was curious about what would truly change...

Finding and Killing Blockers with Redgate AI Tech

By

Redgate has a research arm, called the Foundry, that has been experimenting with AIs...

Back at Small Data SF in 2025

By

Today I’m in San Francisco at Small Data SF 2025. I went to the...

Read the latest Blogs

Forums

Distributed Availability Group Issue / Misunderstanding.

By goodtimecharlie

Not sure if this is a tech mistake I've made or a lack of...

Large posts full of code not allowed anymore?

By Lowell

Several times now, I've seen a post asking for a solution. I've replied, and...

Data > Hype

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Data > Hype

Visit the forum

Question of the Day

Slipstream parameters

What parameters are needed to enable a slipstream installation for setup.exe (SQL Server setup)?

See possible answers