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
Two picket fence sections meeting at one shared post, one painted vermilion, one cream, with no gap between them.

Filtering on Dates Without Losing the Index

April 17, 2008
Pinal Dave
SQL Performance
Execution Plan, SQL DateTime, SQL Index, SQL Server

Filtering on dates without losing an index means using searchable ranges; learn half-open boundaries, date and datetime differences, and plan checks.

Read More
Gouache painting: in a rehearsal room, a vermilion rug strip marks the center

DATEPART tzoffset: Read the Signed Offset in Minutes

March 31, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Server

DATEPART tzoffset extracts an offset in minutes. Preserve its sign, test sub-hour values and retain the source temporal type.

Read More
SQL SERVER - UDF to Return a Calendar for Any Date for Any Year.

SQL SERVER – UDF to Return a Calendar for Any Date for Any Year

February 20, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts

Reader Dan Golden built on my weekly calendar function to create a UDF to return a calendar for any date for any year. I fixed a small first and last week bug.

Read More
SQL SERVER - Execute Same Query and Statement Multiple Times Using Command GO

SQL SERVER – Execute Same Query and Statement Multiple Times Using Command GO

January 9, 2008
Pinal Dave
SQL Performance
SQL DateTime, SQL Scripts

Need to run the same statement several times without copy and paste? Put a number after the command GO, like GO 5, and SQL Server runs the batch that many times.

Read More
SQL SERVER - 2008 - New DataTypes DATE and TIME

SQL SERVER – 2008 – New DataTypes DATE and TIME

December 23, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts

SQL Server 2008 adds separate DATE and TIME datatypes, something DBAs wanted for years. I compare them with the SQL Server 2005 way of using DATETIME.

Read More
Three round wall clocks side by side in a station hall, each showing a different hour, morning light on the tiles.

Handling Time Zones in SQL Server

November 6, 2007
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL DateTime, SQL Function, SQL Server

Handling time zones in SQL Server means storing an instant, converting with AT TIME ZONE, and testing daylight saving gaps.

Read More
SQL SERVER - Introduction and Example for DATEFORMAT Command

SQL SERVER – Introduction and Example for DATEFORMAT Command

September 28, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts

I found DATEFORMAT in a Jr. DBA’s code. SET DATEFORMAT sets the order of month, day and year so SQL Server can read date strings in other formats.

Read More
Previous 1 … 23 24 25 26 27 28 29 Next
  • Books
  • Testimonials
  • Privacy Policy

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