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: two rows of four hay bales stand in an orchard

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 - UDF - Function to Convert Text String to Title Case - Proper Case

SQL SERVER – UDF – Function to Convert Text String to Title Case – Proper Case

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

My UDF udf_TitleCase converts any string to Title Case, also called Proper Case. The post has a sample call, its output and the full T-SQL code of the function.

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
SQL SERVER - SQL Joke, SQL Humor, SQL Laugh

SQL SERVER – SQL Joke, SQL Humor, SQL Laugh

January 26, 2007
Pinal Dave
SQL Tips and Tricks
SQL Humor

A short SQL joke I found on DavidM’s blog on SQLTeam: roll call at DBMS school, and MySQL rushes in late because it thought it was February 31st.

Read More
A baguette resting in a slotted wooden slicing guide, a few slices cut and the long uncut end beside a red cloth.

SQRT: Keep Fractional Roots in the Result

January 20, 2007
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL NULL, SQL Server

SQRT produces an approximate square root. These read-only examples preserve fractional roots, state the display precision and distinguish a missing input from zero.

Read More
Previous 1 … 567 568 569 570 571 572 Next
  • Books
  • Testimonials
  • Privacy Policy

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