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 hand sorting mixed cutlery into three compartments, one red-handled spoon set apart

Splitting Full Names Into First, Middle and Last in T-SQL

October 28, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Server, SQL Server 2022, SQL String

Try splitting full names with T-SQL string functions, preserve token order, and flag suffixes or compound surnames for review.

Read More
Execution time statistics.

SQL SERVER – Retrieve – Select Only Date Part From DateTime – Best Practice – Part 2

October 18, 2008
Pinal Dave
SQL Performance
Best Practices, SQL DateTime, SQL Function, SQL Scripts

Which way to select only date part from DATETIME is faster? After more tests on large tables, I now suggest the DATEADD and DATEDIFF method over CONVERT.

Read More
SQL SERVER - Get Numeric Value From Alpha Numeric String - UDF for Get Numeric Numbers Only

SQL SERVER – Get Numeric Value From Alpha Numeric String – UDF for Get Numeric Numbers Only

October 14, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

A simple UDF that gets only the numbers from an alpha numeric string, using PATINDEX and STUFF, with test values for empty, NULL and mixed strings.

Read More
Gouache painting: on a workbench, a pair of plain smooth brass tweezers holds one polished clay marble, while a wide wooden clamp holds a bundle of three marbles tied with string; a loose marble and a second tied bundle lie nearby, one string vermilion

JSON_QUERY or JSON_VALUE: Match the JSON Shape

October 13, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL NULL, SQL Server, SQL String

JSON_QUERY or JSON_VALUE depends on the JSON shape you need. One read-only document exposes scalar, object, array, JSON null and missing-path results side by side.

Read More
SQL SERVER - 2008 - Enhenced TRIM() Function - Remove Trailing Spaces, Leading Spaces, White Space, Tabs, Carriage Returns, Line Feeds

SQL SERVER – 2008 – Enhenced TRIM() Function – Remove Trailing Spaces, Leading Spaces, White Space, Tabs, Carriage Returns, Line Feeds

October 10, 2008
Pinal Dave
SQL Performance
SQL Function, SQL Scripts, SQL String, SQL Utility

Need to remove trailing spaces, leading spaces, tabs, carriage returns and line feeds? Here is an enhanced TRIM function built from a script by Russ and Erik.

Read More
SQL Server 2005 Query Window.

SQL SERVER – 2008 – TRIM() Function – User Defined Function

October 9, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

SQL Server 2000, 2005 and 2008 have no TRIM() function, but LTRIM and RTRIM together do the job. Here is a simple UDF that trims both sides at once.

Read More
Gouache painting: five round buns sit in a row on a long bakery board

SUBSTRING Boundaries: Start at Zero, One or Beyond

October 8, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

SUBSTRING boundaries distinguish start zero, start one and positions past the end. Read empty strings, shortened counts and typed NULL results.

Read More
Previous 1 … 62 63 64 65 66 67 68 … 92 Next
  • Books
  • Testimonials
  • Privacy Policy

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