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
Two wooden meringue boards, each with four meringues and two empty wells on opposite ends.

binary Conversion: Strings and Numbers Pad on Different Sides

January 31, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server

binary Conversion pads and truncates on different sides depending on the source type. I compare one integer with one string at two target widths. The resulting byte sequences show why width alone is not the complete rule.

Read More
Three upright carved wooden forms stand in a shallow wooden tray beside a red cloth and tool case.

REPLICATE: Zero Copies and Negative Counts Differ

January 27, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Reports, SQL Scripts, SQL Server

REPLICATE treats zero copies differently from a negative count. I keep the source and requested count beside the result. Byte lengths and NULL flags reveal several blank-looking outcomes.

Read More
SQL SERVER - Introduction to Statistical Functions - VAR, STDEVP, STDEV, VARP

SQL SERVER – Introduction to Statistical Functions – VAR, STDEVP, STDEV, VARP

January 20, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function

VAR, STDEVP, STDEV and VARP are statistical functions that also fit the aggregate function definition. A quick AdventureWorks example shows all four.

Read More
SQL SERVER - Introduction to Aggregate Functions

SQL SERVER – Introduction to Aggregate Functions

January 19, 2008
Pinal Dave
SQL Interview Questions and Answers
SQL Function

What are Aggregate Functions in SQL Server? The Books Online definition, the full list, and the NULL and GROUP BY rules that candidates often miss.

Read More
Two empty pale ceramic bowls beside a small terracotta pebble.

UNICODE: Supplementary Characters Depend on the Collation

January 18, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

UNICODE returns an integer for the first character, and supplementary-character support affects that integer. I make the collation explicit when interpreting those values. Otherwise the same visible input can produce a misleading comparison.

Read More
Three woven baskets hold nothing, folded cream linen and blue wool, respectively.

COALESCE Fallbacks: Empty Text Is Still a Supplied Value

January 17, 2008
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Server

COALESCE fallbacks keep empty text and spaces as supplied values. Apply an empty-value policy before choosing a display name.

Read More
Two ivory trays hold separate groups of small blue and cream ceramic dishes.

Conditional COUNT: ELSE 0 Counts Nonmatching Rows

January 13, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Reports, SQL Scripts, SQL Server

Conditional COUNT includes zero when CASE returns it. I compare an omitted ELSE with a zero branch before aggregating. A no-match group and an empty input expose the difference from SUM.

Read More
Previous 1 … 73 74 75 76 77 78 79 … 92 Next
  • Books
  • Testimonials
  • Privacy Policy

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