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 rotary egg beater rests between separate mixing bowls and a jug of already beaten mixture

CTE Referenced Twice: Why the Query Runs It Twice

April 16, 2012
Pinal Dave
SQL Performance
CTE, Execution Plan, SQL Group By, Temp Table

Writing a CTE name two times can mean doing the work two times. Two small demos show when a temp table helps and when it only adds cost.

Read More
SharePoint SSIS adapters.

SQL SERVER – Working with FileTables in SQL Server 2012 – Part 2 – Methods to Insert Data Into Table

April 15, 2012
Pinal Dave
SQL Tips and Tricks
Filestream

Part 2 of my FileTables series covers two methods to insert data into a FileTable in SQL Server 2012, starting with a simple copy and paste.

Read More
FULL.

SQL SERVER – Working with FileTables in SQL Server 2012 – Part 1 – Setting Up Environment

April 14, 2012
Pinal Dave
SQL Tips and Tricks
Filestream

Part 1 of working with FileTables in SQL Server 2012: what a FileTable is, why it helps with file data, and how to set up the environment.

Read More
A whole flowering branch grafted onto a new limb of an apple tree, the joint wrapped in red tape

Building an Org Chart Query With hierarchyid

April 13, 2012
Pinal Dave
SQL Tips and Tricks
CTE, SQL Datatype, SQL Index, SQL Server

Build an org chart with hierarchyid, query descendants and levels, move a team safely, and compare it with recursive queries.

Read More
A very long striped knitted scarf trailing from an armchair across the floor, needles still in the last row

Storing Durations and Summing Time Past 24 Hours

April 12, 2012
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL DateTime, SQL Function, SQL Server

Use whole seconds for summing time beyond 24 hours, aggregate safely, format unlimited hours, and convert legacy time values.

Read More
Gouache painting of a miniature village assembled beside its compartmented storage chest and rolled plan.

Installing AdventureWorks Sample Database: SQL in Sixty Seconds #010

April 11, 2012
Pinal Dave
SQL Video
SQL Backup and Restore, SQL in Sixty Seconds, SQL Sample Database, SQL Server Installation

Installing AdventureWorks is one RESTORE statement, and a few checks before and after it prevent the common failures. The tests here read a backup header and file list, restore under a new name with MOVE, and confirm the result on SQL Server 2025.

Read More
A mother duck leading ducklings across a lawn, one duckling following another toward the pond

Modeling Friends and Followers With SQL Server Graph Tables

April 10, 2012
Pinal Dave
SQL Tips and Tricks
SQL Index, SQL Joins, SQL Server, SQL Server 2017

Build SQL Server graph tables for follows, mutual connections and friends of friends, then use shortest paths and compare a junction table.

Read More
Previous 1 … 542 543 544 545 546 547 548 … 844 Next
  • Books
  • Testimonials
  • Privacy Policy

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