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
Three glass fishing floats in rope nets hanging from three of four wooden pegs, the last peg left empty.

CHOOSE: Handle Indexes Outside the List

April 7, 2007
Pinal Dave
SQL Tips and Tricks
SQL CASE, SQL Function, SQL Server

CHOOSE returns an item from a positional list. Check unsupported indexes and compare a consistently typed CASE expression with an explicit fallback.

Read More
Metal scissors beside cream and vermilion ribbon strips, with a sage box on slate cloth.

STUFF Boundaries: Insert Text and Handle NULL Results

March 31, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

STUFF boundaries govern insertion and deletion. See valid positions, zero length, NULL replacement and out-of-range starts.

Read More
SQL SERVER - Difference between DISTINCT and GROUP BY - Distinct vs Group By

SQL SERVER – Difference between DISTINCT and GROUP BY – Distinct vs Group By

March 29, 2007
Pinal Dave
SQL Performance
SQL Function, SQL Joins, SQL Scripts

What is the difference between DISTINCT and GROUP BY? They usually produce the same plan. Use GROUP BY for aggregates and DISTINCT to remove duplicates.

Read More
SQL SERVER - @@IDENTITY vs SCOPE_IDENTITY() vs IDENT_CURRENT - Retrieve Last Inserted Identity of Record

SQL SERVER – @@IDENTITY vs SCOPE_IDENTITY() vs IDENT_CURRENT – Retrieve Last Inserted Identity of Record

March 25, 2007
Pinal Dave
SQL Performance
SQL Function, SQL Index, SQL Scripts

@@IDENTITY vs SCOPE_IDENTITY() vs IDENT_CURRENT: how each one returns the last identity value, and why a trigger can make @@IDENTITY give the wrong one.

Read More
SQL SERVER - SQL Commandments - Suggestions, Tips, Tricks

SQL SERVER – SQL Commandments – Suggestions, Tips, Tricks

March 20, 2007
Pinal Dave
SQL Performance
Best Practices, Database, Software Development, SQL Backup and Restore, SQL Constraint and Keys, SQL DateTime, SQL Download, SQL Error Messages, SQL Function, SQL Index, SQL Joins, SQL Server DBCC, SQL Server Security, SQL Stored Procedure

My 20 SQL Commandments for SQL Server, rewritten from an Oracle article: know your data, test with realistic data, write identical statements, and more tips.

Read More
SQL SERVER - Script to Determine Which Version of SQL Server 2000-2005 is Running

SQL SERVER – Script to Determine Which Version of SQL Server 2000-2005 is Running

March 7, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

A quick way to see which version of SQL Server 2000 or 2005 is running: SERVERPROPERTY returns the product version, the product level and the edition.

Read More
Two rows of blue and pale ceramic beads on wooden guides, with one terracotta bead.

WINDOW: Reuse an Explicit Running-Total Frame

February 28, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Reports, SQL Scripts, SQL Server

WINDOW lets me name a window definition and reuse it across compatible calculations. I still specify the partition, ordering and frame. A short name should make the intended calculation easier to review.

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

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