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
Pistachios fill six cavities of a wooden mold while two middle cavities remain empty.

Value Histograms: Counting Rows per Range Bucket in T-SQL

February 21, 2009
Pinal Dave
SQL Tips and Tricks
SQL Group By, SQL Scripts, Temp Table

Turn a column of amounts into a clear shape. Three small traps decide whether your bucket counts are true: empty buckets, uneven ranges and BETWEEN.

Read More
A hand deals plain counters among three cups, each already holding one red counter.

Assigning Rows Round-Robin to Workers With ROW_NUMBER

February 19, 2009
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Scripts, Temp Table

Number the tasks, number the workers, match them with a remainder. A fair queue in one query, and the two shortcuts that quietly break it.

Read More
Uneven cheese portions balance equally because the wider piece contains large holes.

Splitting a Big Table Into Equal Key Ranges for Batch Work

July 21, 2008
Pinal Dave
SQL Performance
Batch, Ranking Functions, SQL Paging, Temp Table

Equal-width key ranges fail when ids have gaps. NTILE cuts by row count instead, so every worker gets a fair share of the table.

Read More
SQL SERVER - SQL SERVER - Comparison : Similarity and Difference #TempTable vs @TempVariable - Part 2

SQL SERVER – SQL SERVER – Comparison : Similarity and Difference #TempTable vs @TempVariable – Part 2

May 12, 2008
Pinal Dave
SQL Tips and Tricks
Temp Table

Can a temp table have indexes? Yes. In Part 2 of #TempTable vs @TempVariable, I explain how temporary table indexes live in TempDB and when they help.

Read More
A pressure cooker on a stove releasing a thin plume of steam from its safety valve, a hand resting nearby

Porting Stored Procedures Between Platforms

March 17, 2008
Pinal Dave
SQL Tips and Tricks
SQL Migration, SQL Server, SQL Stored Procedure, Temp Table

Porting stored procedures means preserving error, transaction, temporary-table, sequence, and date behavior instead of translating tokens.

Read More
Four small pipettes rest in white cups while a hand drips amber liquid from a fifth pipette into a glass blending bottle.

Weighted Scores: Ranking Products by Several Columns at Once

February 10, 2008
Pinal Dave
SQL Tips and Tricks
Mathematics, Ranking Functions, SQL Order By, Temp Table

Adding rating to units sold ranks by whichever column is biggest. Scale first, weigh second, and keep the weights in a table anyone can read.

Read More
Matching enamel chips clipped in pairs, with a similar pair kept apart and linked by a loose thread.

Matching Two Customer Lists When Names and Emails Are Messy

January 8, 2008
Pinal Dave
SQL Tips and Tricks
Ad Hoc Query, Duplicate Records, SQL Joins, SQL String, Temp Table

Clean the text, climb from safe rules to fuzzy ones, and keep one best answer per subscriber. A ladder of joins you can paste into SSMS today.

Read More
Previous 1 … 7 8 9 10
  • Books
  • Testimonials
  • Privacy Policy

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