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: beside it, the same ring hovers above an empty saucer and closes on nothing, so no match is made

Simple CASE and NULL: Use a Searched Condition

March 18, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

Simple CASE and NULL do not match through equality. Use a searched IS NULL branch, preserve empty text, and make the result type explicit.

Read More
Escaping a single quote in SQL Server: 'Villeneuve-d''Ascq' with the doubled quote in red

SQL SERVER – How to Escape Single Quotes – Fix: Error: 105 Unclosed quotation mark after the character string

February 17, 2008
Pinal Dave
SQL Interview Questions and Answers
SQL Error Messages, SQL Scripts, SQL Server, SQL String

Jr. Developer asked me other day how to escape single quote?
User can escape single quote using two single quotes (NOT double quote).

Read More
Two empty pale ceramic bowls beside a small terracotta pebble.

UNICODE: Supplementary Characters Depend on the Collation

January 18, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

UNICODE returns an integer for the first character, and supplementary-character support affects that integer. I make the collation explicit when interpreting those values. Otherwise the same visible input can produce a misleading comparison.

Read More
Matching enamel chips clipped in pairs, with a similar pair kept apart and linked by a loose thread.

Matching Two Customer Lists When Names and Emails Are Messy

January 8, 2008
Pinal Dave
SQL Tips and Tricks
Ad Hoc Query, Duplicate Records, SQL Joins, SQL String, Temp Table

Clean the text, climb from safe rules to fuzzy ones, and keep one best answer per subscriber. A ladder of joins you can paste into SSMS today.

Read More
SQL SERVER - Do Not Store Images in Database - Store Location of Images (URL)

SQL SERVER – Do Not Store Images in Database – Store Location of Images (URL)

December 13, 2007
Pinal Dave
SQL Interview Questions and Answers
Database, SQL String

Should you store images in database tables? My advice: keep the image location (URL) in a VARCHAR column instead, so the database stays small and updates stay simple.

Read More
SQL SERVER - UDF - Remove Duplicate Chars From String

SQL SERVER – UDF – Remove Duplicate Chars From String

December 5, 2007
Pinal Dave
SQL Tips and Tricks
Duplicate Records, SQL Function, SQL Scripts, SQL String

A reader, Virendra Chauhan, shared a UDF that removes duplicate chars from one large string. Here is his REMOVE_DUPLICATE_INSTR function and how to call it.

Read More
Two brass keys beside a small open wooden cabinet, one hanging inside and one resting on blue cloth.

RIGHT: Zero Padding Can Remove Significant Digits

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

RIGHT can make zero padding look correct while quietly removing significant digits. I validate the allowed numeric range before creating a fixed-width label. The suffix expression alone cannot tell whether the input fits.

Read More
Previous 1 … 16 17 18 19 20 21 22 Next
  • Books
  • Testimonials
  • Privacy Policy

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