This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
One leaf-impressed tile sits between two different interpretation templates.

SQL SERVER – Puzzle – Playing with Datetime with Customer Data

September 15, 2016
Pinal Dave
SQL Puzzle
SQL DateTime, SQL Scripts, SQL Server

Playing with Datetime became a puzzle when one conversion worked for a customer but failed for me. The input was unchanged.

Read More
An unmarked seven-compartment organizer sits beside a movable grouping boundary.

SQL SERVER – Find Week of the Year Using DatePart Function

September 2, 2016
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

The DATEPART function returns a week number according to its week definition. I choose that convention before using calendar logic.

Read More
Gouache painting: a wooden weaving loom on a craft table, a thick skein of cream yarn at one end fanning out into many neat separate strands across the loom; one strand is vermilion

SQL SERVER 2016 – STRING_SPLIT Function Performance Comparison – Notes from the Field #118

March 17, 2016
Pinal Dave
SQL Tips and Tricks
Notes from the Field, SQL DateTime, SQL Function, SQL Scripts, SQL Server

Splitting strings once meant temp tables or CROSS APPLY. In Notes from the Field #118, Kathi Kellenberger compares STRING_SPLIT performance in SQL Server 2016.

Read More
Seven herb pots form a sequence with the beginning marked by a vermilion pot

Interview Question of the Week #046 – How @@DATEFIRST and SET DATEFIRST Are Related?

November 22, 2015
Pinal Dave
SQL Interview Questions and Answers
SQL DateTime, SQL Scripts

How are @@DATEFIRST and SET DATEFIRST related? One sets the first day of the week for your session, the other reads it back, and language matters too.

Read More
A single dewdrop at the tip of a leaf hanging over a low stone wall at night, about to fall on the far side

Why datetime Turns .999 Milliseconds Into the Next Day

November 18, 2015
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL DateTime, SQL Server

See why 999 milliseconds rounds into tomorrow with datetime, compare datetime2 precision, and use an exclusive next-day report boundary.

Read More
SQL SERVER - Adding Datetime and Time Values Using Variables

SQL SERVER – Adding Datetime and Time Values Using Variables

October 30, 2015
Pinal Dave
SQL Tips and Tricks
SQL DateTime

Adding a time variable to a datetime variable throws Msg 402. The fix is to CAST the time to datetime first. Examples of adding datetime and time values.

Read More
Last day of a month.

SQL SERVER – Finding If Date is Last Day of the Month

September 24, 2015
Pinal Dave
SQL Tips and Tricks
SQL DateTime

Did an employee join on the last day of the month? I show the add one day trick and the EOMONTH function from SQL Server 2012 to check it.

Read More
Previous 1 … 6 7 8 9 10 11 12 … 29 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com