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
Gouache painting of a row of deck chairs alternating cream and slate blue with one vermilion chair

Alternate Row Colors in an HTML Table Using T-SQL

June 25, 2018
Pinal Dave
SQL Tips and Tricks
HTML, SQL Scripts, SQL Server

To get alternate row colors in an HTML table from T-SQL, number the rows with ROW_NUMBER and pick a color by odd or even. This post builds the whole table with STRING_AGG, escapes special characters, colors one cell by value, and explains why the numbering must follow the display order.

Read More
AutoRecover Information Setting.

SQL SERVER – Save Auto Recover Information – SSMS

June 23, 2018
Pinal Dave
SQL Tips and Tricks
SQL Server, SQL Server Management Studio

SSMS can save your unsaved queries if it crashes, yet few people know the setting. Here is where to find Auto Recover under Tools, Options and why it matters.

Read More
Milk pouring into a whole row of glass bottles at once from a bar of spouts in a dairy

Tally Table: Replacing WHILE Loops With a Set of Numbers

June 22, 2018
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Server 2022, SQL String

Use a tally table or GENERATE_SERIES to replace repeated date, character, and missing-number loops with ordered sets of rows.

Read More
Errmsg about logins created with password.

SQL SERVER – Transfer Logins Error: Msg 15419: Supplied Parameter sid Should be Binary(16) – sp_help_revlogin

June 21, 2018
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Login, SQL Scripts, SQL Server, SQL Server Security

Moving logins with sp_help_revlogin, I hit Msg 15419: supplied parameter sid should be binary(16). Here is what causes it and how to fix the script.

Read More
Two differently colored shoes fitting the same adjustable shoe stretcher

Names That Differ Only by Case: Finding Them With COLLATE

June 20, 2018
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL CASE, SQL Server

A case-insensitive target can turn two rows into one. This walk-through finds the colliding names first, including the ones with trailing spaces.

Read More
Invalid value given for parameter password.

SQL SERVER – Transfer Logins Error: Msg 15021: Invalid Value Given for Parameter Password

June 19, 2018
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Password, SQL Server, SQL Server Security

Moving logins with sp_help_revlogin failed with Msg 15021: invalid value given for parameter PASSWORD. Here is what was wrong with the hashed password.

Read More
Over and partion by query results.

SQL SERVER – Adding Values WITH OVER and PARTITION BY

June 16, 2018
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Function, SQL Order By, SQL Scripts, SQL Server

How do you sum values for each group without GROUP BY and still keep every row? Here is how SUM with OVER and PARTITION BY answers a reader’s question.

Read More
Previous 1 … 111 112 113 114 115 116 117 … 572 Next
  • Books
  • Testimonials
  • Privacy Policy

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