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
Punch needle beside a continuous stitched row with its last loose loop withdrawn

Gapless Invoice Numbers That Restart Every Year

October 25, 2012
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Transactions

Finance hates a missing invoice number. A small counter table and one short transaction keep the numbers gapless and restart them each year.

Read More
SQL SERVER - Resolving SQL Server Connection Errors - SQL in Sixty Seconds #030 - Video

SQL SERVER – Resolving SQL Server Connection Errors – SQL in Sixty Seconds #030 – Video

October 24, 2012
Pinal Dave
SQL Video
Database, SQL in Sixty Seconds, SQL Scripts, SQL Server Management Studio

A sixty second video on resolving SQL Server connection errors, the kind first time IT pros often hit after a fresh install and cannot figure out.

Read More
A roofer laying overlapping wooden shingles: one long continuous run, a bare gap, then a short second run.

Merging Overlapping Date Ranges Into Continuous Periods

October 22, 2012
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL DateTime, SQL Scripts, SQL Server

Use running end dates when merging overlapping ranges, choose boundary rules, and return continuous periods without losing nested intervals.

Read More
SQL SERVER - Find First Non-Numeric Character from String

SQL SERVER – Find First Non-Numeric Character from String

October 14, 2012
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

No built-in function finds the first non-numeric character in a string, so I use PATINDEX. Here is a quick script with sample data you can try.

Read More
Hands squaring a neat stack of plain envelopes beside a messy pile, a red rubber band around the tidy stack

Cleaning Address Data in T-SQL: Trimming, Casing and Standardizing

October 12, 2012
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

Start cleaning address data with preserved originals, normalized spaces, careful casing, street-word mappings, and postal-code review flags.

Read More
Gouache painting of three neat crates of pears beside a loose heap of peaches on a red cloth

Count Rows and Indexes for Every Table in SQL Server

October 10, 2012
Pinal Dave
SQL Performance
Clustered Index, SQL Heap, SQL Index, SQL Scripts

To count rows and indexes for every table, one query on the catalog views answers four questions at once: how many tables, which are heaps, how many nonclustered indexes each has, and how many rows each holds. The post tests it on a demo database and explains where the row count comes from.

Read More
SQL SERVER - Importance of User Without Login - T-SQL Demo Script

SQL SERVER – Importance of User Without Login – T-SQL Demo Script

October 4, 2012
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Server Security

A T-SQL demo script for a user without login: create the user, impersonate it, check its access, revert and then grant permissions, one step at a time.

Read More
Previous 1 … 199 200 201 202 203 204 205 … 366 Next
  • Books
  • Testimonials
  • Privacy Policy

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