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
An unopened present with a red ribbon beside flat balloons and a party hat on a hall table

Calculating Age From a Date of Birth Correctly in T-SQL

August 7, 2009
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

Use an explicit anniversary rule for calculating age in T-SQL, including February 29, years-months-days output and birthday lookups.

Read More
A wristwatch lying beside a torn-off paper calendar page on a wooden desk.

SQL SERVER – Get Time in Hour:Minute Format from a Datetime – Get Date Part Only from Datetime

August 6, 2009
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

Get the time in Hour:Minute Format, or just the date, from a DATETIME with CONVERT styles 108 and 101, or with the TIME and DATE types in SQL Server 2008.

Read More
SQL SERVER - Get a List of Fixed Hard Drive and Free Space on Server

SQL SERVER – Get a List of Fixed Hard Drive and Free Space on Server

August 5, 2009
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure, Undocumented SQL

No OS access? Run xp_fixeddrives from Management Studio to list each fixed hard drive with its free space, then plan where TempDB and indexes go.

Read More
SQL SERVER - Forgot the Password of Username SA

SQL SERVER – Forgot the Password of Username SA

August 4, 2009
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server Management Studio, SQL Server Security

Forgot the password of username SA? Resetting it is easy when another sysadmin login or a Windows admin account can get in. Here are your options.

Read More
Gouache painting: in the upper row they are ordered by the color of their base band, so the tallest candle with the earliest color stands first

MIN and MAX Text: Collation Chooses the Extremes

August 2, 2009
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

MIN and MAX text use collation ordering, not numeric magnitude. Compare digit strings, empty text and NULL using an explicit BIN2 contract.

Read More
A small plain brass desk bell beside a closed notebook and a wooden tray in soft daylight.

Monitoring With What You Already Have

August 1, 2009
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server

Build useful SQL Server alerts with Agent, operators, failed-job notifications, and a review routine that verifies the whole delivery path.

Read More
Two groups of sage, blue and cream cloths hang above a table with a red cord.

Date Conversion Styles: Disambiguate Day and Month

July 31, 2009
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL NULL, SQL Scripts, SQL Server

Date conversion styles define how incoming text becomes a date. Compare month-first and day-first interpretations without guessing. Keep invalid dates separate from missing input.

Read More
Previous 1 … 279 280 281 282 283 284 285 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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