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 - Puzzle - Challenge - Error While Converting Money to Decimal

SQL SERVER – Puzzle – Challenge – Error While Converting Money to Decimal

November 27, 2010
Pinal Dave
SQL Puzzle
SQL Error Messages, SQL Scripts

A puzzle for you: why does converting money to decimal throw Msg 8115, an arithmetic overflow error, when you cast 12345.67 as DECIMAL(5,2)? Share your answer.

Read More
SQL SERVER - Concat Function in SQL Server - SQL Concatenation

SQL SERVER – Concat Function in SQL Server – SQL Concatenation

November 25, 2010
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL String

Is there a CONCAT function in SQL Server? An attendee said MySQL and Oracle have one. I show how the plus operator joins strings, numbers and column values.

Read More
Gouache painting: three positions along a tack room wall

geometry STIsEmpty: Empty Shapes Are Different From SQL NULL

November 24, 2010
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STIsEmpty tests whether an existing spatial instance has an empty point set. I keep that condition separate from SQL NULL. A missing database value and a present empty geometry are different inputs.

Read More
LIKE cardinality illustrated by clear jars containing different stone mixtures beside bowls on a rich apothecary bench.

LIKE Cardinality: String Statistics and Row Estimates

November 22, 2010
Pinal Dave
SQL Performance
SQL Performance, SQL Scripts, SQL Statistics

LIKE row estimates depend on the pattern, string statistics and compilation context. Compare estimated and actual matching rows in a controlled distribution, while keeping cardinality estimates separate from the chosen access path.

Read More
Small wooden practice blocks in varied shapes beside an open blank notebook on an oak table.

How to Practise SQL Without a Real Database

November 20, 2010
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server

You can practise SQL with small invented tables, generated rows, and repeatable exercises without access to a company's production database.

Read More
SQL SERVER - Information Related to DATETIME and DATETIME2

SQL SERVER – Information Related to DATETIME and DATETIME2

November 15, 2010
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts

A reader comment explains the precision issue between DATETIME and DATETIME2: values lose precision when converted between types. Here is the workaround.

Read More
A filing cabinet drawer propped open by a wooden wedge, a coat still hanging on the chair pushed up against it.

SQL SERVER – FIX ERROR 3702 Cannot drop database “MyDBName” because it is currently in use

November 14, 2010
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server

Error 3702: cannot drop database because it is currently in use. Set it to SINGLE_USER WITH ROLLBACK IMMEDIATE, then drop it. Best kept for demo servers.

Read More
Previous 1 … 242 243 244 245 246 247 248 … 363 Next
  • Books
  • Testimonials
  • Privacy Policy

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