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 - 2008 - Enhenced TRIM() Function - Remove Trailing Spaces, Leading Spaces, White Space, Tabs, Carriage Returns, Line Feeds

SQL SERVER – 2008 – Enhenced TRIM() Function – Remove Trailing Spaces, Leading Spaces, White Space, Tabs, Carriage Returns, Line Feeds

October 10, 2008
Pinal Dave
SQL Performance
SQL Function, SQL Scripts, SQL String, SQL Utility

Need to remove trailing spaces, leading spaces, tabs, carriage returns and line feeds? Here is an enhanced TRIM function built from a script by Russ and Erik.

Read More
SQL Server 2005 Query Window.

SQL SERVER – 2008 – TRIM() Function – User Defined Function

October 9, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

SQL Server 2000, 2005 and 2008 have no TRIM() function, but LTRIM and RTRIM together do the job. Here is a simple UDF that trims both sides at once.

Read More
Gouache painting: five round buns sit in a row on a long bakery board

SUBSTRING Boundaries: Start at Zero, One or Beyond

October 8, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

SUBSTRING boundaries distinguish start zero, start one and positions past the end. Read empty strings, shortened counts and typed NULL results.

Read More
Gouache painting: on a straight farm lane two gateposts stand apart

SWITCHOFFSET Versus TODATETIMEOFFSET: Two Offset Operations

October 7, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Server

SWITCHOFFSET versus TODATETIMEOFFSET depends on the input contract. Preserve a known instant or attach an offset to a genuinely local clock.

Read More
SQLAuthority News - Author Visit - SQL Hour at Patni Computer Systems

SQLAuthority News – Author Visit – SQL Hour at Patni Computer Systems

October 7, 2008
Pinal Dave
SQL Tips and Tricks
MVP, SQL User Group, SQLAuthority Author Visit

Our user group’s first SQL Hour at Patni Computer Systems, Gandhinagar: Jacob Sebastian on Query Optimization Basics and my session Know your SQL.

Read More
A hand lifts the corner of a doormat to show bare stone and the faint outline where a spare key used to lie.

Renaming or Disabling the sa Login

October 6, 2008
Pinal Dave
SQL Tips and Tricks
DBA, SQL Login, SQL Password, SQL Server Security

Renaming or disabling the sa login requires a dependency inventory, tested alternate admin access, and monitoring after the change.

Read More
A rounded terracotta pot in a long shallow blue-gray ceramic tray.

STR: Check Width and Reduced Decimal Places

October 5, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

STR can reduce decimal places when its requested width cannot hold the complete fractional display. I inspect the complete text, including spaces and signs. A populated result does not guarantee that the number remains visible.

Read More
A narrowboat rising in a canal lock, one of three locks stepping up a green hillside.

Patching an Availability Group in the Right Order

October 4, 2008
Pinal Dave
SQL Tips and Tricks
AlwaysOn, Cumulative Update, SQL High Availability, SQL Patch, SQL Server

Patching an Availability Group safely means updating secondaries first, checking synchronization, failing over, and updating the old primary.

Read More
SQL Server execution plan.

SQL SERVER – 2008 – Find If Index is Being Used in Database

October 3, 2008
Pinal Dave
SQL Performance
SQL DMV, SQL Index, SQL Scripts

How do you find if an index is being used in your database? My quick script checks sys.dm_db_index_usage_stats, so you can drop unused indexes safely.

Read More
A set of architect's drawings pinned flat on a drawing board with a scale rule laid across them, the drawn lines clear and no lettering anywhere.

What Is a Database Schema in SQL Server?

October 3, 2008
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, Developer, SQL Server

A database schema is a namespace inside a database. What dbo really is, why two tables can carry the same name, how a schema makes permissions something you set once, and why naming it in your code saves you from odd bugs.

Read More
Previous 1 … 514 515 516 517 518 519 520 … 590 Next
  • Books
  • Testimonials
  • Privacy Policy

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