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 on a frosty windowsill with a red thread tied around one finger, snow and early snowdrops outside

Upcoming Birthdays in the Next 30 Days With T-SQL

July 30, 2012
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Performance, SQL Server

Find upcoming birthdays with T-SQL across year boundaries, choose a February 29 policy, and build a clear next-30-days list.

Read More
A harmonica exposes separate chambers from one end, with a small vermilion accent on its casing

PARSENAME for Dotted Values: Build Numbers and Object Names

July 29, 2012
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Instance, SQL Order By, SQL String

Why does revision 12 sort before 7? Because the parts are text. Here is how PARSENAME fixes it, and where it trips you up.

Read More
SQL SERVER - Difference Between ORIGINAL_LOGIN() and SUSER_SNAME()

SQL SERVER – Difference Between ORIGINAL_LOGIN() and SUSER_SNAME()

July 28, 2012
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

What is the difference between ORIGINAL_LOGIN() and SUSER_SNAME()? A quick script with context switching shows when the two return different logins.

Read More
SQL SERVER - Query to Get Unique Distinct Data Based on Condition - Eliminate Duplicate Data from Resultset

SQL SERVER – Query to Get Unique Distinct Data Based on Condition – Eliminate Duplicate Data from Resultset

July 27, 2012
Pinal Dave
SQL Tips and Tricks

DISTINCT and GROUP BY do not always help. I use ROW_NUMBER to eliminate duplicate data and keep only the record with the highest price.

Read More
SQL SERVER - Answer - How to Convert Hex to Decimal or INT

SQL SERVER – Answer – How to Convert Hex to Decimal or INT

July 26, 2012
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

Readers sent great answers on how to convert Hex to Decimal or INT in SQL Server. Here are their solutions, with due credit, using 0x00000100 as the example.

Read More
A tripod and a desk lamp set up facing an empty chair in a tidy home office.

SQL SERVER – How do I Record Video and Webcast – Milestone – 2200th Blog Post – SQL in Sixty Seconds #022 – Video

July 25, 2012
Pinal Dave
SQL Video
Database, SQL in Sixty Seconds, SQL Scripts, SQL Server Management Studio

My 2200th blog post and the 22nd SQL in Sixty Seconds episode: a short video on how I record video and webcast content, plus thanks to the people who help.

Read More
A dustpan collects spilled grain beside one of two intact neighboring strips

Exchange Spill: When Parallel Streams Write to tempdb

July 24, 2012
Pinal Dave
SQL Performance
Execution Plan, Parallel, SQL Extended Events, SQL TempDB

Tempdb writes during a parallel query, with no sort warning in sight? Here is a demo that spills every time, and how to find the operator.

Read More
SQL SERVER - Observation of Top with Index and Order of Resultset

SQL SERVER – Observation of Top with Index and Order of Resultset

July 23, 2012
Pinal Dave
SQL Tips and Tricks
SQL Index

Adding an index can change which rows TOP returns when there is no ORDER BY. I share three real cases where the order of resultset was blamed on the wrong thing.

Read More
A hand hanging pruning shears on a shed pegboard where each tool has a painted outline behind it

Keeping Database Documentation Next to the Code

July 22, 2012
Pinal Dave
SQL Tips and Tricks
Best Practices, DBA, SQL Documentation, SQL Server

Keep database documentation close to SQL Server objects with extended properties, durable module comments, and catalog-generated reports.

Read More
A narrow fabric tape stretches between two fixed clips with cloth extending outside both ends

Time-Limited Access: Expiring Grants With a Valid-Until Column

July 21, 2012
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL DateTime, SQL Server Security, SQL View

A ValidUntil column does nothing by itself. Here is how to make the read path enforce it, with a demo you can run.

Read More
Previous 1 … 370 371 372 373 374 375 376 … 593 Next
  • Books
  • Testimonials
  • Privacy Policy

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