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
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
A wooden xylophone with bars stepping from long to short, a red mallet resting between two neighbouring bars.

LAG and LEAD: Comparing Each Row With the One Before It

April 2, 2014
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Function, SQL Order By, SQL Server

Use LAG and LEAD for monthly comparisons, handle defaults and percent change, choose explicit frames, and detect status transitions.

Read More
An open bento box with neat compartments, one holding a row of small rice balls, a red plum on the rice.

JSON_OBJECT and JSON_ARRAY: Building JSON in SQL Server 2022

March 30, 2014
Pinal Dave
SQL Tips and Tricks
JSON, SQL Function, SQL NULL, SQL Server, SQL Server 2022

Build JSON_OBJECT and JSON_ARRAY values in SQL Server 2022, control null handling, nest arrays, and compare rowset and aggregate output.

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

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