Загрузка...

Learn T-SQL With Erik: DATEDIFF Considerations

In this video, I continue our journey through the T-SQL language by delving into some interesting considerations around the 'DATE DIFF' function. We explore how to handle boundaries when working with dates and times, such as deciding whether a year is measured from January 1st or December 31st, and how different data types can affect these calculations. I also discuss the nuances of using 'DATE TRUNK', a new feature in SQL Server 2022 that simplifies date truncation, but note its limitations when it comes to adding time spans dynamically. Throughout the video, I emphasize the importance of carefully considering the chasms you want to span when working with dates and times, as this can significantly impact performance and data accuracy. If you're interested in diving deeper into these topics or other SQL Server best practices, be sure to check out the links below for more resources, including my free SQL Server performance monitoring tool and the full course material available at a discounted price.

CHAPTERS

00:00:00 - Introduction
00:02:15 - T-SQL Basics
00:04:18 - Date Diff Considerations
00:06:14 - Date Add and Date Diff
00:07:56 - SQL Server 2022 Improvements
00:09:35 - Time Boundaries and Chasms
00:11:31 - Data Type Considerations
00:12:58 - Conclusion

Видео Learn T-SQL With Erik: DATEDIFF Considerations канала Erik Darling (Erik Darling Data)
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять