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
Neatly arranged plain wooden building pieces beside a pencil on a quiet worktable.

Writing T-SQL Somebody Else Can Maintain

September 15, 2007
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server

Write maintainable T-SQL with clear names, explicit results, focused procedures, and comments that explain the business reason behind the code.

Read More
A row of rain gauges holding different amounts of water

Grouping Dates Into Buckets With DATE_BUCKET

September 14, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Server, SQL Server 2022

DATE_BUCKET groups timestamps into hourly, weekly, and custom intervals, with an origin that determines where every boundary lands.

Read More
Two glass jars stand side by side, one empty and one holding red seeds.

COUNT_BIG: Count Rows and Non-NULL Values as bigint

September 12, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL NULL, SQL Scripts, SQL Server

COUNT_BIG helps me name the counting rule before reading the result. Compare rows, supplied values and distinct readings. Then check empty results and the bigint return type.

Read More
Two brass keys beside a small open wooden cabinet, one hanging inside and one resting on blue cloth.

RIGHT: Zero Padding Can Remove Significant Digits

September 10, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

RIGHT can make zero padding look correct while quietly removing significant digits. I validate the allowed numeric range before creating a fixed-width label. The suffix expression alone cannot tell whether the input fits.

Read More
A cook seen from behind tastes from a small trial saucepan while a large covered pot waits beside it.

Testing a Cumulative Update Before Production

September 6, 2007
Pinal Dave
SQL Tips and Tricks
Cumulative Update, SQL Backup and Restore, SQL Patch, SQL Server, Testing

Testing a Cumulative Update means restoring real data, replaying key jobs, comparing plans and timings, and signing off before production.

Read More
A wooden mannequin fallen off its chair laughing at a long paper printout

Funny SQL Server Error Messages and What They Really Mean

September 5, 2007
Pinal Dave
SQL Tips and Tricks
Deadlock, SQL Error Messages, SQL Humor, SQL Server

Some real SQL Server error messages read like jokes. Here are my favorite funny SQL Server error messages and what each one is really telling you.

Read More
Gouache painting: on a market counter a pink grapefruit has had one thin wedge cut from it, and the wedge lies on a small saucer

RADIANS: Cast Integer Degrees Before Conversion

September 5, 2007
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

RADIANS changes degrees into radians, but its input type affects the result. The example contrasts integer and float arguments while keeping the original degree values.

Read More
Previous 1 … 419 420 421 422 423 424 425 … 438 Next
  • Books
  • Testimonials
  • Privacy Policy

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