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: three identical white saucers on a counter each hold a small white mound that looks the same from a distance

SQL_VARIANT_PROPERTY: Inspect the Base Type

October 1, 2011
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

SQL_VARIANT_PROPERTY exposes a variant’s BaseType. Compare numeric, date, string and binary inputs with their stored base types intact.

Read More
Execution_count result.

SQL SERVER – Denali – DMV Enhancement – sys.dm_exec_query_stats – New Columns

September 28, 2011
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Scripts

SQL Server Denali adds four new columns to sys.dm_exec_query_stats, like total_rows and last_rows, so you can see how many rows your queries returned.

Read More
A broad rug beater beside a hanging rug and a much smaller soft brush

Stop Chasing Every Seek: When a Table Scan Is the Right Plan

September 28, 2011
Pinal Dave
SQL Tips and Tricks
SQL Performance, SQL Scripts, SQL Server

A Clustered Index Scan is not always the problem. Count the reads for a seek with lookups, a scan and the optimizer’s own pick, then see when the seek really wins.

Read More
One bias tape maker supplies two sewing projects, with an unused cut section left aside

A Shared SEQUENCE for Invoices and Credit Notes in One Range

September 27, 2011
Pinal Dave
SQL Tips and Tricks
Database, SQL Scripts, SQL Server

One sequence, two tables, and an auditor asking about number 8. See where gaps come from, how duplicates sneak in, and where uniqueness should live.

Read More
EOMONTH() query results in SQL Server Management Studio.

SQL SERVER – Denali – Date and Time Functions – EOMONTH() – A Quick Introduction

September 20, 2011
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

A quick introduction to the EOMONTH function in SQL Server Denali: get the last day of the month for a date, one of seven new date and time functions.

Read More
SQL SERVER 2012 - DateTime Functions - DATEFROMPARTS() - DATETIMEFROMPARTS() - DATETIME2FROMPARTS()

SQL SERVER 2012 – DateTime Functions – DATEFROMPARTS() – DATETIMEFROMPARTS() – DATETIME2FROMPARTS()

September 19, 2011
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server, SQL Server 2012

SQL Server 2012 adds seven new datetime functions, such as DATEFROMPARTS, DATETIMEFROMPARTS and EOMONTH. A quick look at building dates from their parts.

Read More
A smooth band of mist following the shape of a jagged mountain ridge

Moving Averages in T-SQL

September 18, 2011
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Function, SQL Scripts, SQL Server

Moving averages in T-SQL use ROWS BETWEEN for rolling windows, but date gaps and duplicate dates decide what the result actually means.

Read More
Previous 1 … 220 221 222 223 224 225 226 … 366 Next
  • Books
  • Testimonials
  • Privacy Policy

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