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
Two rows of blue and pale ceramic beads on wooden guides, with one terracotta bead.

WINDOW: Reuse an Explicit Running-Total Frame

February 28, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Reports, SQL Scripts, SQL Server

WINDOW lets me name a window definition and reuse it across compatible calculations. I still specify the partition, ordering and frame. A short name should make the intended calculation easier to review.

Read More
Restore database using SSMS.

SQL SERVER – Restore Database Backup using SQL Script (T-SQL)

February 25, 2007
Pinal Dave
SQL Video
SQL Backup and Restore, SQL Error Messages, SQL Scripts, SQL Server, SQL Utility

Restore Database backups with a T-SQL script: read the logical file names with RESTORE FILELISTONLY, set single user mode, then run RESTORE WITH MOVE.

Read More
Hands placing a leaking tap assembly on a cloth at a shop counter, its worn washer and screw laid out in a row

How to Ask a SQL Server Question That Gets Answered

February 24, 2007
Pinal Dave
SQL Tips and Tricks
Best Practices, Developer, SQL Error Messages, SQL Server

A SQL Server question that gets answered includes the exact build, full error text, a small repro, and the fixes already tried.

Read More
Three colored stone groups in a divided wooden tray beneath three terracotta bowls of stones.

TRANSLATE: Map Characters Simultaneously Instead of Cascading Replacements

February 24, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

TRANSLATE maps each input character once, which matters when replacement characters also appear in the search list. Nested REPLACE calls can process earlier replacements again. I compare both results before choosing a cleanup expression.

Read More
Cream and slate twine balls occupy two wicker baskets, a third stays empty, and a shared tray holds both colors

Showing Comma-Separated Role Members for Every Database Role

February 20, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL Server Security

Comma-separated role members make direct assignments easier to review. The queries retain empty roles and label public membership as implicit. Keep the underlying rows because nested roles and directory groups need a separate effective-access review.

Read More
Three stone groups stay in order across differently shaped dividers and matching clay bowls

Splitting Text on Several Delimiters With REGEXP_SPLIT_TO_TABLE

February 10, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

REGEXP_SPLIT_TO_TABLE handles several separators in SQL Server 2025. These examples keep source keys and ordinals while separating trimming from empty-token handling. A small edge-case set also shows where a regular expression is not a CSV parser.

Read More
SQL SERVER - Query Analyzer Short Cut to display the text of Stored Procedure

SQL SERVER – Query Analyzer Short Cut to display the text of Stored Procedure

January 30, 2007
Pinal Dave
SQL Tips and Tricks
SQL Server, SQL Server Management Studio, SQL Shortcut, SQL Stored Procedure

A quick Query Analyzer shortcut: map sp_helptext to a key, select any SP name and display the text of Stored Procedure right in the result window.

Read More
Previous 1 … 454 455 456 457 458 Next
  • Books
  • Testimonials
  • Privacy Policy

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