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 - User Defined Functions (UDF) to Reverse String - UDF_ReverseString

SQL SERVER – User Defined Functions (UDF) to Reverse String – UDF_ReverseString

May 1, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

UDF_ReverseString returns a reversed string starting from any position you pass. The script of the function plus usage examples, like reversing from the third character.

Read More
SQL SERVER - Copy Column Headers in Query Analyzers in Result Set

SQL SERVER – Copy Column Headers in Query Analyzers in Result Set

May 1, 2007
Pinal Dave
SQL Tips and Tricks
Best Practices

To copy column headers with your results in Query Analyzer, set Results to Text, Tab Delimited and turn on Print column headers in Options. Video included.

Read More
SQLAuthority.com 100th Post - Gratitude Note to Readers

SQLAuthority.com 100th Post – Gratitude Note to Readers

May 1, 2007
Pinal Dave
Personal

A thank you note on the 100th post of SQLAuthority.com, to my readers for their emails, comments and support, and to my parents for their love.

Read More
Two nearly identical brass keys lying side by side on a workbench, one cut with a single notch in a different place.

SQL SERVER – Collate – Case Sensitive SQL Query Search

April 30, 2007
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL Scripts, SQL Search, SQL Server, SQL Utility

Make a SQL Query Search case sensitive: add COLLATE Latin1_General_CS_AS to the WHERE clause so ‘casesearch’ matches one row instead of all four.

Read More
SQL SERVER - FIX : ERROR : Msg 3159, Level 16, State 1, Line 1 - Msg 3013, Level 16, State 1, Line 1

SQL SERVER – FIX : ERROR : Msg 3159, Level 16, State 1, Line 1 – Msg 3013, Level 16, State 1, Line 1

April 30, 2007
Pinal Dave
SQL Performance
SQL Backup and Restore, SQL Error Messages, SQL Scripts, SQL Server Security

Msg 3159 says the tail of the log was not backed up, then Msg 3013 ends RESTORE DATABASE. A script that worked in SQL Server 2000 failed in 2005, and here is why.

Read More
A gouache seed-sorting chute uses a removable red stop block to limit material reaching one tray, with another tray waiting nearby.

SQL SERVER – SET ROWCOUNT and TOP Precedence with Deterministic Limits

April 30, 2007
Pinal Dave
SQL Tips and Tricks
SQL Cursor, SQL Scripts, SQL Server, SQL Server Security

SET ROWCOUNT limits the session, while TOP limits a statement. I reset ROWCOUNT after testing so later queries keep their intended limits.

Read More
Gouache painting: on a felt-lined bench in a rehearsal room, four drumsticks lie jumbled

STRING_SPLIT Ordinals: Order the Rows You Read

April 29, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Order By, SQL Server, SQL String

STRING_SPLIT ordinals preserve a token position for SQL Server 2022 and later. This example keeps duplicate tokens, exposes an empty token and orders the returned rows explicitly.

Read More
A tilted wooden bowl releases unmarked wooden spheres across warm paper, suggesting a random draw.

SQL SERVER – Random Number Generator Script – SQL Query

April 29, 2007
Pinal Dave
SQL Tips and Tricks
SQL Cursor, SQL Random, SQL Scripts, SQL Server, SQL Stored Procedure, SQL Utility

A random number generator in SQL Server needs the correct range and evaluation scope. These tested scripts cover integer bounds, repeatable seeds, per-row values, and common overflow mistakes.

Read More
Gouache painting of databases exchanging packages

SQL SERVER – Replication Keywords Explanation and Basic Terms

April 29, 2007
Pinal Dave
SQL Tips and Tricks
SQL Replication, SQL Scripts, SQL Server

A quick reference of Replication keywords I wrote for Jr. DBAs: publisher, subscriber, distributor, publication and article, each explained in plain words.

Read More
SQL SERVER - Explanation SQL SERVER Merge Join

SQL SERVER – Explanation SQL SERVER Merge Join

April 28, 2007
Pinal Dave
SQL Performance
SQL Joins, SQL Scripts

What a Merge Join needs and when it is fast: two sorted inputs with matching column types. Presorted B-tree indexes make it quick, extra sorts make it costly.

Read More
Previous 1 … 579 580 581 582 583 584 585 … 592 Next
  • Books
  • Testimonials
  • Privacy Policy

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