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: on a felt-lined bench in a rehearsal room, four drumsticks lie jumbled

STRING_SPLIT Ordinals: Order the Rows You Read

April 29, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Order By, SQL Server, SQL String

STRING_SPLIT ordinals preserve a token position for SQL Server 2022 and later. This example keeps duplicate tokens, exposes an empty token and orders the returned rows explicitly.

Read More
SQL SERVER - Good, Better and Best Programming Techniques

SQL SERVER – Good, Better and Best Programming Techniques

April 28, 2007
Pinal Dave
SQL Interview Questions and Answers
SQL Backup and Restore, SQL Constraint and Keys, SQL Cursor, SQL Download, SQL Function, SQL Index, SQL Joins, SQL Scripts, SQL Server DBCC, SQL Server Security, SQL Stored Procedure, SQL Trigger

My notes for a programmers meeting on Good, Better and Best Programming Techniques in SQL Server, plus a funny bug ticket about a client who got no email.

Read More
A gouache mason's courtyard groups paired stones on three distinct height levels, with a red wedge at the middle level.

SQL SERVER – Query to Retrieve the Nth Maximum Value

April 27, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Joins, SQL Scripts, SQL Server

Finding the nth Maximum Value means deciding how ties should count. Here, I rank distinct known salaries.

Read More
Gouache painting: four wooden window shutters stand in a row on a cream plaster farmhouse wall, the first and fourth closed, the second open

Bitwise Flags: Test, Add and Toggle Individual Bits

April 26, 2007
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

Bitwise flags use AND to test, OR to add and XOR to toggle a mask. Keep flag meanings explicit and preserve missing values in read-only examples.

Read More
SQL SERVER - TRIM() Function - UDF TRIM()

SQL SERVER – TRIM() Function – UDF TRIM()

April 24, 2007
Pinal Dave
SQL Performance
SQL Function, SQL Scripts

SQL Server 2005 has LTRIM() and RTRIM() but no TRIM() function, so I wrote a simple UDF for SQL Server 2000 and 2005 that trims both sides. Video included.

Read More
Two brass funnels resting in slate and ivory ceramic vessels.

IIF and CASE: Control Return Types and Use Typed NULL Values

April 23, 2007
Pinal Dave
SQL Tips and Tricks
SQL Coding Standards, SQL Function, SQL Scripts, SQL Server

IIF and CASE choose result values, but their branches also define a shared return type. I make that type explicit when mixed inputs could surprise the reader. Typed NULL values help describe the same output contract.

Read More
SQL SERVER - Query to Find Seed Values, Increment Values and Current Identity Column value of the table

SQL SERVER – Query to Find Seed Values, Increment Values and Current Identity Column value of the table

April 23, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Identity, SQL Index, SQL Scripts, SQL Server, SQL System Table

A query to list every identity column with its seed, increment and current value, plus what those numbers mean and how to reseed a table safely.

Read More
Previous 1 … 86 87 88 89 90 91 92 Next
  • Books
  • Testimonials
  • Privacy Policy

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