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
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
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
SQL Server column information.

SQL SERVER – INFORMATION_SCHEMA.COLUMNS and Value Character Maximum Length -1

July 20, 2012
Pinal Dave
SQL Tips and Tricks
SQL System Table

Why does INFORMATION_SCHEMA.COLUMNS show -1 as the character maximum length? A reader asked me this simple question, and I explain what the negative value means.

Read More
SQL SERVER - Find Column Used in Stored Procedure - Search Stored Procedure for Column Name - Part 2

SQL SERVER – Find Column Used in Stored Procedure – Search Stored Procedure for Column Name – Part 2

July 19, 2012
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Stored Procedure

Readers improved my script to find column used in stored procedure. Imran Mohammed shares newer scripts to search stored procedure for column name.

Read More
Previous 1 … 357 358 359 360 361 362 363 … 572 Next
  • Books
  • Testimonials
  • Privacy Policy

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