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
A CSV file.

SQL SERVER – T-SQL Script to Insert Carriage Return and New Line Feed in Code

August 22, 2007
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL String

Add a carriage return with CHAR(13) and a New Line Feed with CHAR(10) in T-SQL. Handy for formatting output, dynamic SQL with GO, and saving user text.

Read More
SQL SERVER - 2005 Collation Explanation and Translation - Part 2

SQL SERVER – 2005 Collation Explanation and Translation – Part 2

July 14, 2007
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL Scripts, SQL String

Collation Explanation and Translation, part 2: one query on sys.fn_helpcollations() lists all 1011 collations in SQL Server 2005 with a description of each.

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
SQL SERVER - Fix : Error : Server: Msg 131, Level 15, State 3, Line 1 The size () given to the type 'varchar' exceeds the maximum allowed for any data type (8000)

SQL SERVER – Fix : Error : Server: Msg 131, Level 15, State 3, Line 1 The size () given to the type ‘varchar’ exceeds the maximum allowed for any data type (8000)

June 30, 2007
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL String

Msg 131 says the size given to varchar exceeds the maximum allowed (8000). Use VARCHAR(8000), or VARCHAR(MAX) in SQL Server 2005 as the TEXT replacement.

Read More
Gouache painting: on a bakery bench a narrow stoneware crock holds risen dough that has been sliced flat at its rim by a bench scraper

REPLACE Return Limits: Cast the Input to max

June 28, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

REPLACE return limits can truncate text at 8,000 bytes. Cast the searched input to max first, then compare Unicode and non-Unicode byte lengths.

Read More
SQL SERVER - Repeate String N Times Using String Function REPLICATE

SQL SERVER – Repeate String N Times Using String Function REPLICATE

June 25, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

REPLICATE repeats a string N times. I found this T-SQL string function while searching for replication, and it is handy when you need repeated text.

Read More
SQL SERVER - 2005 Row Overflow Data Explanation

SQL SERVER – 2005 Row Overflow Data Explanation

June 23, 2007
Pinal Dave
SQL Performance
SQL Scripts, SQL Server Security, SQL String

Is 8060 bytes per row still the limit in SQL Server 2005? Yes, but varchar, nvarchar, varbinary, sql_variant and CLR types are excluded. That is row overflow data.

Read More
Previous 1 … 17 18 19 20 21 22 Next
  • Books
  • Testimonials
  • Privacy Policy

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