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 of nested wooden boxes, opened one inside another, the smallest holding a single vermilion bead.

JSON_CONTAINS in SQL Server 2025: Searching Inside JSON Arrays

August 31, 2014
Pinal Dave
SQL Tips and Tricks
JSON, SQL Function, SQL Scripts

JSON_CONTAINS checks whether a JSON document holds a value at a path, including inside an array. This post tests it on SQL Server 2025: the json data type it needs, numbers versus text, case, NULL results and the older OPENJSON way.

Read More
Script to find first day of current month.

SQL SERVER – Script to Find First Day of Current Month

August 14, 2014
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function

Michael Usov suggested a quick way to find the first day of current month while keeping the DATETIME datatype, with or without the time part.

Read More
A swallow returning to last year's mud nest under the eaves of an old stone barn.

First and Repeat Purchases: Tagging Customer Orders With ROW_NUMBER

August 10, 2014
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Function, SQL Scripts, SQL Server

Tag repeat purchases with deterministic order numbering, calculate days to the second order, and compare customer cohorts fairly.

Read More
MySQL - UDF - Validate Integer Function

MySQL – UDF – Validate Integer Function

July 26, 2014
Pinal Dave
SQL Tips and Tricks
MySQL, SQL Function

MySQL has no ISNUMERIC function like SQL Server, so here is a simple user defined function that uses a regular expression to validate integer values.

Read More
A butter knife spreading a whole row of toast slices in one long stroke on a wooden board.

Scalar UDF Inlining: When Old Functions Suddenly Get Fast

July 24, 2014
Pinal Dave
SQL Performance
Execution Plan, SQL Function, SQL Performance, SQL Server 2019

Check scalar UDF inlining eligibility, database settings, function options, and execution plans before claiming a performance improvement.

Read More
Eight ducks in a row on a pond, some upright and some tail-up, one flipping over with red feet showing

SELECT 7 & 7 or 7 ^ 7: Bitwise XOR, AND and OR on Integers

May 28, 2014
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Operator, SQL Server

Understand bitwise XOR, AND and OR in T-SQL, test and change integer flags, explain two sevens, and compare the newer bit functions.

Read More
A needle stitching a small red flower in cross stitch on linen stretched in a wooden embroidery hoop.

UNISTR and Unicode Escapes in SQL Server 2025

May 18, 2014
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL Function, SQL Server, SQL String, Unicode

Build Unicode strings with UNISTR in SQL Server 2025, compare NCHAR, and preserve accented letters, Hindi text, and emoji in storage.

Read More
Previous 1 … 25 26 27 28 29 30 31 … 92 Next
  • Books
  • Testimonials
  • Privacy Policy

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