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
Oct13

JSON_QUERY or JSON_VALUE: Match the JSON Shape

Pinal Dave
SQL Tips and Tricks
SQL Function, SQL NULL, SQL Server, SQL String
No Comments

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.

Continue Reading
Oct12

SQL Injection: The Joke, the Failure and the Parameter Fix

Pinal Dave
SQL Tips and Tricks
Best Practices, Dynamic SQL, SQL Humor, SQL Server Security
14 Comments

SQL Injection makes a good joke and a terrible incident. The tests here show a concatenated query returning every row for one hostile name, the same text passed as a parameter returning none, a table name caught by QUOTENAME, and a read-only user blocked from dropping a table.

Continue Reading
Oct11

OLE DB or ODBC for Connecting to SQL Server

Pinal Dave
SQL Tips and Tricks
Linked Server, SQL Connection, SQL Server, SSIS
1 Comment

Choose OLE DB or ODBC for SQL Server by the component you run, especially SSIS, linked servers, and applications using current drivers.

Continue Reading
Oct10

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

Pinal Dave
SQL Performance
SQL Function, SQL Scripts, SQL String, SQL Utility
24 Comments

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.

Continue Reading
Oct9

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

Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts
21 Comments

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.

Continue Reading
Oct8

SUBSTRING Boundaries: Start at Zero, One or Beyond

Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String
No Comments

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

Continue Reading
Oct7

SWITCHOFFSET Versus TODATETIMEOFFSET: Two Offset Operations

Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Server
No Comments

SWITCHOFFSET versus TODATETIMEOFFSET depends on the input contract. Preserve a known instant or attach an offset to a genuinely local clock.

Continue Reading
Previous 1 … 739 740 741 742 743 744 745 … 846 Next

SQL Server slow? Let's fix it together in about four hours.

Pinal Dave

In my Comprehensive Database Performance Health Check, you share your screen, I guide you, and we fix your biggest performance troublemakers. No passwords. No remote access.

You keep every script, and the know-how to fix it yourself next time.

Want your whole team to learn it?

My Practical Workshop has no PowerPoint, just live demos. My AI Enablement Workshop shows your team where AI saves hours, and where it quietly costs them.

Over 400 customers have worked with me this way, and not one shared a password. See all consulting options.


Who We Are

Pinal Dave is an SQL Server Performance Tuning Expert and independent consultant with over 24 years of hands-on experience. He holds a Masters of Science degree and numerous database certifications.

Pinal has authored 19 books and 125 Pluralsight courses. To freely share his knowledge and help others build their expertise, Pinal has also written more than 5,800 database tech articles on his blog at https://blog.sqlauthority.com.

Pinal is also a CrossFit Level 1 Trainer (CF-L1) and CrossFit Level 2 Trainer (CF-L2).


Nupur Dave is a social media enthusiast and an independent consultant. She primarily focuses on the database domain, helping clients build short and long-term multi-channel campaigns to drive leads for their sales pipeline.


Shaivi Pinalkumar Dave is a book author and a women’s artistic gymnast.

  • Books
  • Testimonials
  • Privacy Policy

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