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
SQL SERVER - 2005 - A Simple Way To Defragment All Indexes In A Database That Is Fragmented Above A Declared Threshold

SQL SERVER – 2005 – A Simple Way To Defragment All Indexes In A Database That Is Fragmented Above A Declared Threshold

March 4, 2008
Pinal Dave
SQL Performance
SQL Error Messages, SQL Index, SQL Scripts, SQL Server DBCC

The BOL script to defragment all indexes in a database above a declared threshold failed with Msg 2501. I fixed the missing schema prefix so it runs on SQL Server 2005.

Read More
SQL SERVER - How to Retrieve TOP and BOTTOM Rows Together using T-SQL

SQL SERVER – How to Retrieve TOP and BOTTOM Rows Together using T-SQL

March 2, 2008
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Function, SQL Joins, SQL Scripts, SQL Server

Need TOP 1 and BOTTOM 1 in one result? UNION fails with two ORDER BY clauses. Here is a simple T-SQL way to retrieve TOP and BOTTOM Rows together.

Read More
SQL SERVER - Dynamic Case Statement - FIX : ERROR 156 : Incorrect syntax near the keyword

SQL SERVER – Dynamic Case Statement – FIX : ERROR 156 : Incorrect syntax near the keyword

February 28, 2008
Pinal Dave
SQL Performance
SQL Error Messages, SQL Scripts

Using CASE in ORDER BY to switch between ASC and DESC gives Error 156: Incorrect syntax near the keyword. I show two ways to write a dynamic case that works.

Read More
Escaping a single quote in SQL Server: 'Villeneuve-d''Ascq' with the doubled quote in red

SQL SERVER – How to Escape Single Quotes – Fix: Error: 105 Unclosed quotation mark after the character string

February 17, 2008
Pinal Dave
SQL Interview Questions and Answers
SQL Error Messages, SQL Scripts, SQL Server, SQL String

Jr. Developer asked me other day how to escape single quote?
User can escape single quote using two single quotes (NOT double quote).

Read More
SQL SERVER - Msg: 2593 : There are ROWCOUNT rows in PAGECOUNT pages for object 'OBJECT'.

SQL SERVER – Msg: 2593 : There are ROWCOUNT rows in PAGECOUNT pages for object ‘OBJECT’.

February 16, 2008
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server, SQL Server DBCC

DBCC shows Msg 2593: There are ROWCOUNT rows in PAGECOUNT pages for object. It is harmless and for information only. Here is what it means.

Read More
An amber warning lamp standing alone on wet concrete in a dark plant room

SQL SERVER – FIX : ERROR : Cannot find template file for new query (C:\Program Files\Microsoft SQL Server\90\Tools\ Binn\VSShell\Common7\ IDE\sqlworkbenchprojectitems\Sql\ SQLFile.sql)

February 3, 2008
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server, Starting SQL

Cannot find template file for new query means SSMS lost a small local file. Where it lives, how to restore it, and what to check next.

Read More
SQL SERVER - FIX : ERROR : The query processor could not start the necessary thread resources for parallel query execution

SQL SERVER – FIX : ERROR : The query processor could not start the necessary thread resources for parallel query execution

January 30, 2008
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server

What to do when the query processor could not start the thread resources for parallel query execution, and why this error often clears itself.

Read More
Previous 1 … 102 103 104 105 106 107 108 … 114 Next
  • Books
  • Testimonials
  • Privacy Policy

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