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
Rows of white coffee mugs on shelves, ready for the work week

SQL SERVER – Working with Business Days in SQL Server – A Different Approach

December 10, 2013
Pinal Dave
SQL Tips and Tricks
Excel, SQL Scripts, SQL Server

I recommend that you download XLeratorDB and try this problem along with me, this is going to be a fun exercise and something new to learn about Business Days.

Read More
Round wooden pieces fit a blue sorting frame while an angular red piece remains outside.

SQL SERVER – How to Allow Only Alphabets in Column – Create Check Constraint to Insert Only Alphabets

December 9, 2013
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Scripts, SQL Server

Allow only alphabets in a SQL Server column with an explicit ASCII-letter rule. These tested examples reject empty strings, NULL, spaces, digits, and punctuation while explaining collation and existing-data checks.

Read More
SQL SERVER - Location of Statistics Before and After Database is Marked as a Read-Only

SQL SERVER – Location of Statistics Before and After Database is Marked as a Read-Only

December 2, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Statistics

Where do old statistics go when a database becomes read-only? The location of statistics created before the change stays the same, and they remain permanent.

Read More
SQL SERVER - Statistics for Read-Only Database are in TempDB

SQL SERVER – Statistics for Read-Only Database are in TempDB

November 29, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Statistics

Statistics usually live in the same database as the table, so where do they go for a read-only database? The answer is TempDB. Here is how it works.

Read More
SQL SERVER - MySQL - Order Column by Nearest Value for Any Integer

SQL SERVER – MySQL – Order Column by Nearest Value for Any Integer

November 27, 2013
Pinal Dave
SQL Tips and Tricks
MySQL, SQL Order By, SQL Scripts

How do you order column values by how close they are to any integer, such as -5? Here is a script that works the same way on SQL Server and MySQL.

Read More
SQL SERVER - Export Data AS CSV from Database Using SQLCMD

SQL SERVER – Export Data AS CSV from Database Using SQLCMD

November 25, 2013
Pinal Dave
SQL Tips and Tricks
CSV, SQL Scripts, SQL Server

We often import CSV into SQL Server, but how do you export data as CSV with SQLCMD? Two simple commands, one with column headers and one without.

Read More
Backup settings for database restore.

SQL SERVER – FIX : Error 3154: The backup set holds a backup of a database other than the existing database – SSMS

November 23, 2013
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Data Storage, SQL Error Messages, SQL Scripts

Error 3154 says the backup set holds a backup of a different database. Here is how to fix it in SSMS, plus the T-SQL RESTORE WITH REPLACE option.

Read More
Previous 1 … 179 180 181 182 183 184 185 … 363 Next
  • Books
  • Testimonials
  • Privacy Policy

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