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
Gouache painting of a trimmed date fruit on a cutting board with the trimmings in a small red dish

Change in Date Format: Why LEFT Turns GETDATE Into Text

September 20, 2016
Pinal Dave
SQL Puzzle
SQL DateTime, SQL Function, SQL Scripts, SQL Server

A change in date format shows up when you apply LEFT to GETDATE: the date goes from year first to month name first. This puzzle explains the implicit conversion behind it, how language settings change the text, and how to get the date you want on purpose.

Read More
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
SplitMyString SQL Server result set.

SQL SERVER – Puzzle – Solve Splitting Strings Puzzle

June 2, 2016
Pinal Dave
SQL Puzzle
SQL Function, SQL Scripts, SQL Server, SQL String

A Splitting Strings puzzle: take a column holding delimited values, split them and return how many values each row has. How would you solve it?

Read More
SQL SERVER - Puzzle - Inside Working of Datatype smalldatetime

SQL SERVER – Puzzle – Inside Working of Datatype smalldatetime

July 31, 2015
Pinal Dave
SQL Puzzle
SQL DateTime

A developer got odd results when casting strings sent from an app. This puzzle looks at how the smalldatetime datatype works inside SQL Server.

Read More
DISTINCT Values in NVARCHAR Query.

SQL SERVER – Puzzle – DISTINCT Values in NVARCHAR

July 17, 2015
Pinal Dave
SQL Puzzle

Why does SELECT DISTINCT treat ‘ß’ and ‘SS’ differently under each collation? A short puzzle on DISTINCT values in NVARCHAR, born from an SSIS unique key error.

Read More
Server Management Studio Process.

SQL SERVER – Process ID X was killed by hostname ABC, host process ID Y

July 15, 2015
Pinal Dave
SQL Puzzle

Seen the ERRORLOG message that a process ID was killed by hostname, with a host process ID? I explain each placeholder in error 18100 and what it tells you.

Read More
Sql server result window.

SQL SERVER – Puzzle – Working with functions to Concatenate columns

July 10, 2015
Pinal Dave
SQL Puzzle

A code review puzzle: 15 fields joined with ISNULL on every column. Can you concatenate columns with NULL values in a simpler way using SQL Server functions?

Read More
Previous 1 … 3 4 5 6 7 8 9 … 22 Next
  • Books
  • Testimonials
  • Privacy Policy

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