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
Solder sucker beside a recovered original bead and a separate new lump

Rethrowing Errors With THROW and Keeping the Original Number

March 6, 2013
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server

A bare THROW passes an error on untouched. A new THROW or a copied RAISERROR message does not. See the proof, plus one semicolon trap.

Read More
SQL SERVER - SSMS Does NOT Print NULL Values

SQL SERVER – SSMS Does NOT Print NULL Values

March 4, 2013
Pinal Dave
SQL Tips and Tricks
SQL NULL, SQL Scripts, SQL Server, SQL Server Management Studio

Here is a very interesting question asked on the blog by Karthik. I really liked the question and I would like to discuss this here about SSMS doe snot Print NULL values. 

Read More
A wooden cartwheel hub lying flat on a workshop bench with five spokes radiating out from it.

What Is a Star Schema?

March 3, 2013
Pinal Dave
SQL Tips and Tricks
Business Intelligence, Data Warehousing, Database, SQL Server

A star schema is one fact table surrounded by dimension tables. What facts and dimensions hold, why grain is the decision you cannot undo, why the data repeats on purpose, and a worked example in AdventureWorksDW.

Read More
Small streams joining larger rivers that merge into one wide river, a red bridge across it.

Subtotals and Grand Totals With ROLLUP and GROUPING SETS

March 2, 2013
Pinal Dave
SQL Tips and Tricks
SQL Group By, SQL Reports, SQL Server, SQL Union clause

Build region, product, and grand totals with ROLLUP, CUBE, and GROUPING SETS, then label subtotal rows and compare plans.

Read More
Two boxes. The path /Library/Book in nodes() returns 3 rows, one per book. The path /Library/Book/Reviewer returns 5 rows, one per reviewer, each with its BookID, rank and reviewer name

nodes() Method in SQL Server: Aliases and Row Patterns

March 1, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL XML

The nodes() method turns each element at a path into one row you can query. This post builds a small catalog of books and reviewers, and shows the two alias errors, query() against value(), the singleton rule, how the row pattern decides the rows, and CROSS APPLY for the next level. Every result comes from SQL Server 2025.

Read More
A table of FORMAT strings for 2024-08-12: MMMM gives August, MMM gives Aug, MM gives 08. Beside it, for 9:22:38 pm, MM gives 10, mm gives 22, HH gives 21, hh gives 09 and ss gives 38

Custom Date Format Strings in SQL Server: MM Is Not mm

February 28, 2013
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

Custom date format strings tell FORMAT exactly which parts of a date to show. This post compares CONVERT styles with FORMAT, lists the standard and custom letters, and shows the traps: MM against mm, YYYY against yyyy, month names that sort wrong, and a culture that changes with the session. Every result comes from SQL Server 2025.

Read More
Two maps. On the left, six land parcels drawn as rectangles. On the right, the same land merged by owner into three shapes: School 78, Club 80 and Town 8 square units, with all land merged into one polygon of 158

Spatial Unions in SQL Server: STUnion and UnionAggregate

February 27, 2013
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Datatype, SQL Scripts, SQL Server

Spatial unions merge shapes that touch or overlap into one shape. This post uses six land parcels on a flat grid to show STContains, STUnion for two shapes, chained unions, UnionAggregate with GROUP BY, and CollectionAggregate for comparison. Every area and result comes from SQL Server 2025.

Read More
Previous 1 … 272 273 274 275 276 277 278 … 416 Next
  • Books
  • Testimonials
  • Privacy Policy

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