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
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
SQL SERVER - Orphaned MS DTC Transaction Information

SQL SERVER – Orphaned MS DTC Transaction Information

May 14, 2008
Pinal Dave
SQL Performance
SQL Error Messages, SQL Scripts

An orphaned MS DTC transaction kept crashing our IIS application pool. A quick script on sys.syslockinfo shows if you have one, and a Microsoft hotfix solved it.

Read More
SQL SERVER - Function Property - Deterministic or Non-Deterministic

SQL SERVER – Function Property – Deterministic or Non-Deterministic

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

How do you tell if a user defined function is deterministic or non-deterministic? One OBJECTPROPERTY call with IsDeterministic gives you the answer.

Read More
Colored ceramic beads in a pale shallow tray beside an empty tray and a separate blue bead.

XQuery distinct-values: Deduplicate Atomic Values, Not Nodes

May 9, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL XML

XQuery distinct-values removes repeated atomic values rather than selecting representative source nodes. I rebuild a small sorted XML result from repeated text. The example also keeps an empty document in view.

Read More
Previous 1 … 314 315 316 317 318 319 320 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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