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
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
SQL SERVER - Difference Between EXEC and EXECUTE vs EXEC() - Use EXEC/EXECUTE for SP always

SQL SERVER – Difference Between EXEC and EXECUTE vs EXEC() – Use EXEC/EXECUTE for SP always

September 13, 2007
Pinal Dave
SQL Tips and Tricks
DBA, SQL Cursor, SQL Scripts, SQL Stored Procedure

What is the difference between EXEC and EXECUTE? None. The real difference is EXEC vs EXEC(), and I show why EXEC belongs before every stored procedure call.

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
SQL SERVER - Frequency of SQL Server Reboot and Restart

SQL SERVER – Frequency of SQL Server Reboot and Restart

September 11, 2007
Pinal Dave
SQL Tips and Tricks
Database, DBA, SQL Server Security

How often should you do a SQL Server reboot? From my experience there is no need, though our network team reboots all our servers every 15 days.

Read More
Three empty rectangular ceramic dishes in a wooden tray beside a blank cream folio and vermilion ribbon.

FORMATMESSAGE: Build a Message Without Raising an Error

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

FORMATMESSAGE returns formatted text without raising an error. Match placeholders to typed arguments and keep formatting separate from control flow.

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
An open key cabinet on the stone wall of a mountain hut, a brass key on its hook above a coiled rope and lantern.

Doing Remote DBA Work Well

September 10, 2007
Pinal Dave
SQL Tips and Tricks
Best Practices, Consulting, DBA, SQL Monitoring

Remote DBA work succeeds with controlled access, current runbooks, agreed change windows, and communication that makes every action visible.

Read More
Previous 1 … 795 796 797 798 799 800 801 … 842 Next
  • Books
  • Testimonials
  • Privacy Policy

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