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 three colored ribbons feeding through a brass guide and joining into one braided cord.

Concat Strings in SQL Server: SQL in Sixty Seconds #035

December 5, 2012
Pinal Dave
SQL Video
SQL in Sixty Seconds, SQL NULL, SQL Scripts, SQL String

To concat strings in SQL Server, use the + operator or the CONCAT function. The tests here show what each one does with NULL, numbers and dates, how the 8000 character limit cuts a result, and when CONCAT_WS or STRING_AGG is the better tool.

Read More
SQL query error.

SQL SERVER – Fix: Error : 402 The data types ntext and varchar are incompatible in the equal to operator

December 4, 2012
Pinal Dave
SQL Tips and Tricks
SQL Error Messages

Error 402 says ntext and varchar are incompatible in the equal to operator. I recreate it with a small table and walk through the possible solutions.

Read More
SQL SERVER - Fix Error: Microsoft OLE DB Provider for SQL Server error '80040e07' or Microsoft SQL Native Client error '80040e07'

SQL SERVER – Fix Error: Microsoft OLE DB Provider for SQL Server error ‘80040e07’ or Microsoft SQL Native Client error ‘80040e07’

December 3, 2012
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Error Messages

Error 80040e07, syntax error converting datetime from character string, usually means a bad date value. In one case a reader had simply misspelled September.

Read More
SQL SERVER - Find Referenced or Referencing Object in SQL Server using sys.sql_expression_dependencies

SQL SERVER – Find Referenced or Referencing Object in SQL Server using sys.sql_expression_dependencies

December 2, 2012
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Scripts, SQL Server, SQL Utility

Which tables does a procedure use, and which procedures use a table? sys.sql_expression_dependencies answers both, with referenced and referencing objects.

Read More
Hands sewing cloth bunting whose cord has run out, two red flags side by side.

STRING_AGG Limits: The 8,000 Byte Error, Ordering and Duplicates

December 1, 2012
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Server, SQL String, SQL XML

Fix STRING_AGG 8,000-byte limits, enforce ordering, remove duplicates before aggregation, and compare its timing with XML.

Read More
A landscape jigsaw puzzle has one loose matching piece beside its open space.

Why Opening an MDF File Directly Goes Wrong

November 30, 2012
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server

Before you attach MDF file copies, check SQL Server versions, service permissions, and missing files, then choose a safer restore or attach path.

Read More
A child's hand printing the same red leaf shape in a row on brown paper with one carved potato stamp.

The WINDOW Clause: Name a Window Once and Reuse It

November 29, 2012
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Function, SQL Server, SQL Server 2022

Use the WINDOW clause to reuse partition and order rules, extend named windows with frames, and keep SQL Server calculations consistent.

Read More
Gouache painting of a toppled tower of wooden blocks caught by a thick red cushion on a toy shop floor

AutoRecover Settings in SSMS: Protect Your Unsaved Queries

November 28, 2012
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Server Management Studio, SQL Utility

The AutoRecover settings in SSMS decide how often unsaved work is copied to disk and how long the copies are kept. This post shows where to find the two options, what they can and cannot protect, how to test them once, and which habit still matters more than any setting.

Read More
Two hill farms in separate valleys linked by one cart track over the ridge, a red cart traveling between them

Distributed Availability Groups: Linking Two Sites Without One Big Cluster

November 27, 2012
Pinal Dave
SQL Tips and Tricks
AlwaysOn, DBA, SQL High Availability, SQL Server Cluster

Understand distributed availability groups, connect two existing groups across sites, inspect health, and plan recovery without one cluster.

Read More
A cork borer and extracted core beside intact and fully opened cork stoppers

SAMPLED vs DETAILED: Running index_physical_stats Safely

November 26, 2012
Pinal Dave
SQL Performance
SQL Index, SQL Performance, SQL Server

A misspelled table name quietly turns into a scan of everything. Here is the guard, and a fair comparison of the three scan modes on one small index.

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

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