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 of a kitchen counter split in two: on the left, chopped vegetables going neatly into small jars; on the right, whole vegetables in a large wooden crate with a knife beside it, and one vermilion bell pepper in the crate.

ETL vs ELT: How Big Data Changed the Way We Load Data

September 30, 2013
Pinal Dave
SQL Tips and Tricks
Data Warehousing, ETL, JSON, SQL Scripts

ETL vs ELT comes down to when you transform: before the load on a separate engine, or after it inside the platform. This post compares the two and runs a small ELT pipeline in T-SQL on JSON orders.

Read More
An open sewing box with a tangle of scraps and threads below and a top tray of spools in neat compartments.

Storing JSON in SQL Server

September 29, 2013
Pinal Dave
SQL Tips and Tricks
JSON, SQL Datatype, SQL Index, SQL Server

Storing JSON in SQL Server can use validated nvarchar or the native 2025 json type, with indexed paths and relational columns for stable facts.

Read More
A puddle on the path, with a red scarf, a carrot and coal saved on the step

Table Variables Survive ROLLBACK: Logging Errors in a Transaction

September 28, 2013
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server, SQL Transactions, SQL Variable

See how table variables survive rollback to retain error details, then write a permanent error log after a failed SQL Server transaction.

Read More
Two nearly matching tile mosaic panels side by side on a bench, tweezers holding one red tile

Trigram Matching: Finding Similar Words With an N-Gram Table

September 27, 2013
Pinal Dave
SQL Tips and Tricks
SQL Index, SQL Search, SQL Server, SQL String

Build trigram matching with GENERATE_SERIES and an indexed n-gram table, rank shared pieces, and compare spelling similarity with SOUNDEX.

Read More
SQL SERVER - Select Columns from Stored Procedure Resultset

SQL SERVER – Select Columns from Stored Procedure Resultset

September 26, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure

Need only some columns from a stored procedure resultset? Store it in a temp table with INSERT INTO and EXEC, then select what you need.

Read More
SQL SERVER - How to Access the Previous Row and Next Row value in SELECT statement? - Part 4

SQL SERVER – How to Access the Previous Row and Next Row value in SELECT statement? – Part 4

September 25, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL Table Operation

Part 4 on reading the previous row and next row value in a SELECT statement. My friend Szymon Wojcik shows how a numbers table can make the query even faster.

Read More
Window for retrieving previous and next rows in SELECT.

SQL SERVER – How to Access the Previous Row and Next Row value in SELECT statement? – Part 3

September 24, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function

My part 2 solution used ROW_NUMBER, which SQL Server 2000 does not have. Here is how to access the previous row and next row in SQL Server 2000.

Read More
One hand passing a small red-handled peeler to another, while a full knife block stays untouched behind.

Granular Server Roles: ##MS_ServerStateReader## and Friends

September 23, 2013
Pinal Dave
SQL Tips and Tricks
DBA, SQL DMV, SQL Login, SQL Server 2022, SQL Server Security

Assign granular server roles in SQL Server 2022, inspect membership, and give monitoring accounts the state access their queries need.

Read More
Window for retrieving previous and next rows in SELECT.

SQL SERVER – How to Access the Previous Row and Next Row value in SELECT statement? – Part 2

September 23, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function

No CTE in your SQL Server 2005 code? Here is another way to get the previous row and next row value in a SELECT statement, using ROW_NUMBER.

Read More
Accessing previous and next row in query results.

SQL SERVER – How to Access the Previous Row and Next Row value in SELECT statement?

September 22, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function

How do you access the previous row and next row value in a SELECT statement? In SQL Server 2012 the LEAD and LAG analytic functions make it simple.

Read More
Previous 1 … 326 327 328 329 330 331 332 … 593 Next
  • Books
  • Testimonials
  • Privacy Policy

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