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 wooden toy animals with the repeats set aside in a basket below.

Removing Repeated Characters From a String With GENERATE_SERIES

December 8, 2012
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Server, SQL Server 2022, SQL String

Remove repeated characters with GENERATE_SERIES, ROW_NUMBER, and ordered STRING_AGG, then benchmark a SQL Server 2019 fallback.

Read More
A wall key rack with five keys, two empty hooks and one hook tied with a red ribbon

A Calendar Table With Holidays for Date Math

December 6, 2012
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts, SQL Server

Build a calendar table with weekdays, fiscal months, and American holiday flags, then count working days and find useful date boundaries.

Read More
SQL SERVER - Find Referenced or Referencing Object in SQL Server using sys.sql_expression_dependencies

SQL SERVER – Find Referenced or Referencing Object in SQL Server using sys.sql_expression_dependencies

December 2, 2012
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Scripts, SQL Server, SQL Utility

Which tables does a procedure use, and which procedures use a table? sys.sql_expression_dependencies answers both, with referenced and referencing objects.

Read More
Hands sewing cloth bunting whose cord has run out, two red flags side by side.

STRING_AGG Limits: The 8,000 Byte Error, Ordering and Duplicates

December 1, 2012
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Server, SQL String, SQL XML

Fix STRING_AGG 8,000-byte limits, enforce ordering, remove duplicates before aggregation, and compare its timing with XML.

Read More
A landscape jigsaw puzzle has one loose matching piece beside its open space.

Why Opening an MDF File Directly Goes Wrong

November 30, 2012
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server

Before you attach MDF file copies, check SQL Server versions, service permissions, and missing files, then choose a safer restore or attach path.

Read More
A child's hand printing the same red leaf shape in a row on brown paper with one carved potato stamp.

The WINDOW Clause: Name a Window Once and Reuse It

November 29, 2012
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Function, SQL Server, SQL Server 2022

Use the WINDOW clause to reuse partition and order rules, extend named windows with frames, and keep SQL Server calculations consistent.

Read More
A cork borer and extracted core beside intact and fully opened cork stoppers

SAMPLED vs DETAILED: Running index_physical_stats Safely

November 26, 2012
Pinal Dave
SQL Performance
SQL Index, SQL Performance, SQL Server

A misspelled table name quietly turns into a scan of everything. Here is the guard, and a fair comparison of the three scan modes on one small index.

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

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