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
A SQL Server message window.

SQL SERVER – T-SQL Script to Devide One Column into Two Column

May 25, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

A quick script to split one column into two with LEFT, RIGHT and CHARINDEX, plus what to check when a value has no comma or has extra spaces.

Read More
SQL SERVER - SQL SERVER - UDF - Get the Day of the Week Function - Part 2

SQL SERVER – SQL SERVER – UDF – Get the Day of the Week Function – Part 2

May 23, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts

Mihir Popat improved my Day of the Week Function with @@DATEFIRST, so Sunday does not have to be the first day of the week. Here is his UDF.

Read More
PIVOT table example.

SQL SERVER – PIVOT Table Example

May 22, 2008
Pinal Dave
SQL Tips and Tricks
PIVOT and UNPIVOT, SQL Scripts, SQL Server

A PIVOT Table example on AdventureWorks that counts addresses by state, plus why UNPIVOT cannot always give you back the original rows.

Read More
A clear tumbler and a corked glass bottle with a sage ribbon on warm paper.

STRING_ESCAPE JSON Text: Escaping Is Not Serialization

May 20, 2008
Pinal Dave
SQL Tips and Tricks
JSON, SQL Function, SQL Server, SQL String

STRING_ESCAPE JSON text is still text that belongs inside a JSON string. This example compares quotations, backslashes and a newline with complete FOR JSON PATH objects.

Read More
An open chef's knife roll with one small paring knife taken out and laid beside a single apple.

Least Privilege for Application Logins

May 19, 2008
Pinal Dave
SQL Tips and Tricks
Best Practices, DBA, SQL Login, SQL Server Security

Design least privilege for SQL Server application logins with roles, schema permissions, and stored procedures, then test real workflows.

Read More
Gouache painting: a short wooden rack holds eight cream balls in one row

Bit Shifts: Move Bits Without Rotating Them

May 16, 2008
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

Bit shifts fill vacant positions with zero and discard bits past the type width. Compare tinyint with int and a negative shift direction.

Read More
A shocked wooden mannequin in front of a wide-open safe that is empty except for one moth

Untested Backup: The Joke That Ends With a Resignation Letter

May 15, 2008
Pinal Dave
SQL Tips and Tricks
DBA, SQL Backup and Restore, SQL Humor, SQL Server DBCC

An untested backup is the darkest joke in the DBA world. Here’s how the story usually ends, and the simple restore drill that keeps you out of it.

Read More
Previous 1 … 506 507 508 509 510 511 512 … 570 Next
  • Books
  • Testimonials
  • Privacy Policy

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