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 - Find Length of Text Field

SQL SERVER – Find Length of Text Field

June 20, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

LEN works for VARCHAR but not for TEXT. To find the length of text field data, use DATALENGTH(textfield). A one line example shows how.

Read More
SQL SERVER - Delay Function - WAITFOR clause - Delay Execution of Commands

SQL SERVER – Delay Function – WAITFOR clause – Delay Execution of Commands

June 18, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts

The WAITFOR clause delays a batch, stored procedure or transaction until a set time or for an interval. I use it daily after restores. DELAY and TIME examples.

Read More
SQL SERVER - 2005 - UDF - User Defined Function to Strip HTML - Parse HTML - No Regular Expression

SQL SERVER – 2005 – UDF – User Defined Function to Strip HTML – Parse HTML – No Regular Expression

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

A simple SQL Server function to parse HTML and keep only the text, with no regular expressions needed. Copy the UDF and try it on your own data.

Read More
Gouache painting: a leather sack tipped over a wooden chute pours golden grain into a narrow stoneware crock, which overflows across the bench

SUM Integer Values: Cast Before the Aggregate

June 15, 2007
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

SUM integer values can exceed int even when each row fits. Cast each input to bigint before aggregation and keep NULL and empty-set behavior visible.

Read More
SQL SERVER - Easy Sequence of SELECT FROM JOIN WHERE GROUP BY HAVING ORDER BY

SQL SERVER – Easy Sequence of SELECT FROM JOIN WHERE GROUP BY HAVING ORDER BY

June 14, 2007
Pinal Dave
SQL Tips and Tricks
Database, DBA, SQL Scripts

The sequence of SELECT, FROM, JOIN, WHERE, GROUP BY, HAVING and ORDER BY that I gave my new hires. Since then they ask me far fewer questions.

Read More
A plain envelope is opened beside a magnifying glass and several blank paper slips.

How to Read a SQL Server Error Message

June 13, 2007
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server

Read a SQL Server error message by separating its number, severity, state, procedure, and line, then preserve the context needed to investigate.

Read More
A wooden mannequin tangled in yarn standing proudly in front of perfectly tidy drawers

Normalization Jokes and the Normal Forms They Make Fun Of

June 12, 2007
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, Normalization, SQL Humor

Normalization jokes are funny because they are true. Here are the classics in my own words, and the first three normal forms they poke fun at.

Read More
Previous 1 … 548 549 550 551 552 553 554 … 570 Next
  • Books
  • Testimonials
  • Privacy Policy

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