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 - FIX : ERROR Msg 244, Level 16, State 1 - FIX : ERROR Msg 245, Level 16, State 1

SQL SERVER – FIX : ERROR Msg 244, Level 16, State 1 – FIX : ERROR Msg 245, Level 16, State 1

July 8, 2007
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Function, SQL Scripts

Msg 244 and Msg 245 come from converting a value to an incompatible data type, often with CAST or ISNULL. Examples of both, and why ISNULL casts to the first type.

Read More
Wooden mannequins with popcorn wait for a filing cabinet to play a movie while another one explains

Explaining a Database to Non-Programmers (It Won’t Play Your Flash Movie)

July 8, 2007
Pinal Dave
Personal
Database, Memory Lane, SQL Humor, Starting SQL

Explaining a database to non-programmers is a real skill. Here’s my old flash movie story and the plain comparisons that work in any meeting.

Read More
SQL SERVER - Convert Text to Numbers (Integer) - CAST and CONVERT

SQL SERVER – Convert Text to Numbers (Integer) – CAST and CONVERT

July 7, 2007
Pinal Dave
SQL Interview Questions and Answers
Best Practices, SQL Function, SQL Scripts

How to convert text to integer with CAST and CONVERT, whether they fail on alpha-numeric values (yes), and how to pull only the numbers from a string.

Read More
SQL SERVER - FIX : Error : msg 8115, Level 16, State 2, Line 2 - Arithmetic overflow error converting expression to data type

SQL SERVER – FIX : Error : msg 8115, Level 16, State 2, Line 2 – Arithmetic overflow error converting expression to data type

July 6, 2007
Pinal Dave
SQL Tips and Tricks
SQL Error Messages

Msg 8115, arithmetic overflow error, comes when a value is too big for its column, like 111111 in a TINYINT. Check the value or widen the column definition.

Read More
Sage and slate-blue ceramic beads, a small vermilion spacer and an empty ring on a braided cord.

CONCAT_WS: Keep NULL and Empty Strings Separate

July 5, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL NULL, SQL Server, SQL String

CONCAT_WS joins values with a separator, but NULL and empty strings have different effects. These examples keep the original fields beside the combined text and byte length.

Read More
LAST_VALUE window frame illustration, two wooden trays holding smooth stones beside a brass divider.

LAST_VALUE: Set the Window Frame for the Final Row

July 5, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Order By, SQL Server

LAST_VALUE changes with its window frame. Compare implicit and whole-partition frames, order tied rows and preserve a final NULL.

Read More
Three long shallow trays of blue ceramic pebbles beside a small square tray of six ochre and rust beads.

BIT_COUNT: Count Set Bits Without Changing Integer Width

July 4, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Server, SQL Server 2022

BIT_COUNT counts active positions in a typed value. Keep integer width visible and distinguish a missing mask from a zero count.

Read More
SQL SERVER - Definition, Comparison and Difference between HAVING and WHERE Clause

SQL SERVER – Definition, Comparison and Difference between HAVING and WHERE Clause

July 4, 2007
Pinal Dave
SQL Interview Questions and Answers
Best Practices, SQL Scripts

I asked every candidate the difference between HAVING and WHERE clause, and none got it right. HAVING filters groups, while WHERE filters individual rows.

Read More
SQL SERVER - Comparison : Similarity and Difference #TempTable vs @TempVariable

SQL SERVER – Comparison : Similarity and Difference #TempTable vs @TempVariable

July 3, 2007
Pinal Dave
SQL Performance
SQL Scripts, SQL TempDB

#TempTable and @TempVariable both live in tempdb, but they differ in scope and purpose. Their similarities and differences, explained side by side.

Read More
SQL SERVER - 2005 Comparison SP_EXECUTESQL vs EXECUTE/EXEC

SQL SERVER – 2005 Comparison SP_EXECUTESQL vs EXECUTE/EXEC

July 2, 2007
Pinal Dave
SQL Performance
SQL Cursor, SQL Download, SQL Scripts, SQL Stored Procedure

SP_EXECUTESQL vs EXECUTE/EXEC in SQL Server 2005: what they share for dynamic SQL, like late compile and variable scope, and how they differ.

Read More
Previous 1 … 564 565 566 567 568 569 570 … 589 Next
  • Books
  • Testimonials
  • Privacy Policy

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