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
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
SQL SERVER - UDF to Return a Calendar for Any Date for Any Year.

SQL SERVER – UDF to Return a Calendar for Any Date for Any Year

February 20, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts

Reader Dan Golden built on my weekly calendar function to create a UDF to return a calendar for any date for any year. I fixed a small first and last week bug.

Read More
Escaping a single quote in SQL Server: 'Villeneuve-d''Ascq' with the doubled quote in red

SQL SERVER – How to Escape Single Quotes – Fix: Error: 105 Unclosed quotation mark after the character string

February 17, 2008
Pinal Dave
SQL Interview Questions and Answers
SQL Error Messages, SQL Scripts, SQL Server, SQL String

Jr. Developer asked me other day how to escape single quote?
User can escape single quote using two single quotes (NOT double quote).

Read More
Gouache painting: on a calm river, three rows of flat stepping stones cross from the near bank to the same vermilion post on the far bank

LOG With a Base: Make the Calculation Explicit

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

LOG with a base makes logarithm meaning explicit. Compare base two, base ten and the natural default using typed, positive inputs.

Read More
SQL Server Management Studio Query Window.

SQL SERVER – Get Current Database Name

February 12, 2008
Pinal Dave
SQL Tips and Tricks
SQL Scripts

Need the current database name in a script? SELECT DB_NAME() returns the name of the database you are running the query in. It is a one line answer.

Read More
Previous 1 … 321 322 323 324 325 326 327 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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