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 hands holding a daisy chain of joined flowers, a single loose daisy on the grass beside them

Storing Emoji and Short Messages: nvarchar, UTF-8 and Length

April 9, 2012
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL Datatype, SQL Server, SQL String, Unicode

Store emoji safely with nvarchar or UTF-8 varchar, compare LEN and DATALENGTH, and choose message limits that fit full Unicode.

Read More
Muddy carrots scrubbed in a farmhouse sink, a colander of clean carrots on the drainboard and peelings in a bowl.

Cleaning Messy Data With T-SQL

April 8, 2012
Pinal Dave
SQL Tips and Tricks
Data Observability, ETL, SQL DateTime, SQL Server, SQL String

Cleaning messy data With T-SQL means trimming text, parsing dates safely, and preserving rejected source rows for correction and replay.

Read More
Three open boxes of different sizes, each holding three dark balls, one ball in each box painted red.

CHAR, VARCHAR, NVARCHAR and VARCHAR(MAX) Quiz: How Many Bytes?

January 16, 2012
Pinal Dave
SQL Puzzle
SQL Column, SQL Datatype, SQL String, Unicode

This CHAR, VARCHAR, NVARCHAR and VARCHAR(MAX) Quiz stores the text abc in three columns and asks how many bytes each one uses. The answer is 10, 3 and 6. A tested script proves it and shows the trailing space trap, the question mark problem and the 8,000 byte limit.

Read More
Two nearly identical white teacups on saucers, one with a small mark on its rim.

Collation Sensitivity Quiz: Does ‘jose’ Match ‘José’?

January 7, 2012
Pinal Dave
SQL Puzzle
SQL Collation, SQL Error Messages, SQL String, Unicode

This Collation Sensitivity Quiz asks whether jose matches JOSE and José in a case-insensitive, accent-sensitive database. The answer is JOSE yes, José no. A tested script compares three collations and shows the width and kana settings too.

Read More
SQL SERVER 2012 - String Function CONCAT() - A Quick Introduction

SQL SERVER 2012 – String Function CONCAT() – A Quick Introduction

September 16, 2011
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

SQL Server 2012 adds the String Function CONCAT(), which joins two or more values into one string. Examples show how it handles numbers, dates and NULLs.

Read More
A query with PATH Item, ROOT Catalog, Price as an attribute and SeedName as text, beside the XML it returns: a Catalog root with four Item elements, each holding a Price attribute and a seed name

XML Element Names in SQL Server: Row, Root and Text With FOR XML PATH

September 1, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL String, SQL XML

XML element names in SQL Server come from your query, and FOR XML PATH lets you choose them. This post sets the row and root names, turns a column into an attribute, writes text inside an element and shows the error you get when an attribute column comes too late. Every result comes from SQL Server 2025.

Read More
Gouache painting of a long loaf sliced into even pieces on a cutting board, one slice set apart on a vermilion napkin.

AI_GENERATE_CHUNKS in SQL Server 2025: Splitting Long Text Into Pieces

August 16, 2011
Pinal Dave
AI
AI, SQL Function, SQL Scripts, SQL String

AI_GENERATE_CHUNKS cuts one long piece of text into smaller pieces inside a query. This post tests the preview function on SQL Server 2025, shows what its columns hold and how overlap works, and explains how chunk size changes the number of pieces.

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

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