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
Hands squaring a neat stack of plain envelopes beside a messy pile, a red rubber band around the tidy stack

Cleaning Address Data in T-SQL: Trimming, Casing and Standardizing

October 12, 2012
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

Start cleaning address data with preserved originals, normalized spaces, careful casing, street-word mappings, and postal-code review flags.

Read More
A tall boot beside a small open shoebox that holds only a small red paper star instead of the boot.

Why CAST to a Short VARCHAR Returns a Star Instead of an Error

September 20, 2012
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Server, SQL String

Understand why a short VARCHAR returns a star for an integer, compare Unicode errors and string truncation, and size conversions safely.

Read More
Gouache painting of a tray of mixed buttons on a sewing table, with a few matching vermilion buttons set apart in a small dish.

REGEXP_COUNT in SQL Server 2025: Counting Pattern Matches in Text

August 25, 2012
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

REGEXP_COUNT counts how many times a pattern matches inside a text value, a job that used to need LEN and REPLACE tricks. This post tests it on SQL Server 2025: start position, flags, NULL and empty text, a data quality check, and where the old trick still fits.

Read More
A harmonica exposes separate chambers from one end, with a small vermilion accent on its casing

PARSENAME for Dotted Values: Build Numbers and Object Names

July 29, 2012
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Instance, SQL Order By, SQL String

Why does revision 12 sort before 7? Because the parts are text. Here is how PARSENAME fixes it, and where it trips you up.

Read More
A pepper mill holds peppercorns above its mechanism with an unsuitable pebble caught before grinding

Second-Order SQL Injection: When Stored Data Becomes Code

May 30, 2012
Pinal Dave
SQL Tips and Tricks
Dynamic SQL, SQL Server Security, SQL String, SQL Variable

A safe insert does not make the saved value safe forever. Here is how stored text turns into code later, and the plain fix.

Read More
Mixed bottles in a crate beside a sorted wooden wine rack, with three wax-sealed amber bottles drawn out together

Word Search Without Full-Text: Build a Word Index Table

May 6, 2012
Pinal Dave
SQL Tips and Tricks
SQL Index, SQL Search, SQL String

LIKE with a leading wildcard reads the whole table. A small side table of words turns that scan into a quick lookup, and you do not need full-text installed.

Read More
A French fry cutter holds a potato against fixed blades with neatly cut pieces beneath it

Multi-Value Report Parameters in T-SQL Without Dynamic SQL

May 5, 2012
Pinal Dave
SQL Tips and Tricks
Reporting Services, SQL Error Messages, SQL String, SQL Sub Query

A report that sends 1, 2, 2, 3 does not need dynamic SQL. Here is how to split, validate and match the list safely.

Read More
Previous 1 … 10 11 12 13 14 15 16 … 23 Next
  • Books
  • Testimonials
  • Privacy Policy

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