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
Gouache painting: seen from above, a round cake turntable holds a plain unfrosted cake

SIN and COS: Use Radians for Trigonometric Inputs

February 29, 2008
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

SIN and COS read angles in radians and return float. These explicit degree conversions show signs, axis angles and fractional results at a chosen decimal display scale.

Read More
SQL SERVER - Dynamic Case Statement - FIX : ERROR 156 : Incorrect syntax near the keyword

SQL SERVER – Dynamic Case Statement – FIX : ERROR 156 : Incorrect syntax near the keyword

February 28, 2008
Pinal Dave
SQL Performance
SQL Error Messages, SQL Scripts

Using CASE in ORDER BY to switch between ASC and DESC gives Error 156: Incorrect syntax near the keyword. I show two ways to write a dynamic case that works.

Read More
SQL SERVER - SELECT 1 vs SELECT * - An Interesting Observation

SQL SERVER – SELECT 1 vs SELECT * – An Interesting Observation

February 26, 2008
Pinal Dave
SQL Performance
SQL Scripts, SQL Server

SELECT 1 vs SELECT * inside IF EXISTS: I ran 4 tests and both gave the same result and the same execution plan cost. Can you find a case where they differ?

Read More
A leaf stencil taped to a plaster wall beside three identical painted sage leaves, a paint sponge on a saucer.

Templates and Snippets in SSMS

February 25, 2008
Pinal Dave
SQL Tips and Tricks
SQL Coding Standards, SQL Scripts, SQL Server Management Studio, SQL Shortcut

Templates and snippets in SSMS turn repeated SQL patterns into editable starting points while keeping environment assumptions visible.

Read More
ROUND or truncate illustration, two pale blocks with rounded and trimmed edges on a blue mat.

ROUND or Truncate: Keep Decimal Width in View

February 24, 2008
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

ROUND or truncate is a choice about the result, not its display format. This complete decimal example checks positive and negative values while preserving enough width for thousands.

Read More
SQL SERVER - Find All The User Defined Functions (UDF) - Part 2

SQL SERVER – Find All The User Defined Functions (UDF) – Part 2

February 22, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

Madhivanan shared another way to find all the user defined functions in a database, using information_schema.routines. Here is his short script.

Read More
Three rolled paper sheets rest beside a plain closed notebook on a warm wooden table.

Reading the SQL Server Error Log Properly

February 21, 2008
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server

Read the SQL Server error log for startup details and incident context, filter it with T-SQL, and cycle files without losing needed history.

Read More
Previous 1 … 318 319 320 321 322 323 324 … 363 Next
  • Books
  • Testimonials
  • Privacy Policy

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