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 - Finding the Occurrence of Character in String

SQL SERVER – Finding the Occurrence of Character in String

August 16, 2010
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

A quick T-SQL method using LEN and REPLACE to count the occurrence of character or word in a string, written as a hint for TSQL Beginners Challenge 14.

Read More
Gouache painting: on a floured board, one long strand of fresh pasta on the left is folded into a V with a doubled-back spike through its middle, overlapping itself

geometry MakeValid: Repair Can Change the Geometry Type

August 14, 2010
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry MakeValid returns a valid geometry from an invalid instance, but the result can change type. I keep the original beside the proposed repair. A validity flag alone does not describe everything that changed.

Read More
A closed walnut chest with a plain rectangular wooden bar and a short vermillion cord on the table.

Random Tokens in SQL Server: Generation, Storage and Expiry Checks

August 11, 2010
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Server, SQL Server Encryption, SQL Server Security

Random tokens in SQL Server need more than a generated value. Their stored state must define expiry, revocation and whether consumption already occurred. A guarded disposable fixture makes the boundary conditions explicit.

Read More
Gouache painting: six wooden fence posts stand in a straight row along a riverbank, equally spaced

GENERATE_SERIES: Make the Step Explicit

August 8, 2010
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Order By, SQL Server

GENERATE_SERIES returns numbers within a declared range. These read-only examples specify the step, preserve input types and order every returned series deliberately.

Read More
Execution Plan test result.

SQL SERVER – Introduction to BINARY_CHECKSUM and Working Example

August 1, 2010
Pinal Dave
SQL Tips and Tricks
Database, SQL Function, SQL Scripts

BINARY_CHECKSUM helps detect changes in a row. My working example shows how it works and why it misses a value changed from A to B and back to A.

Read More
Gouache painting: two squares of leather overlapped in the middle of a cutting table, one slate blue and one cream, offset diagonally

geometry STDifference: Keep the Subtraction Direction

July 31, 2010
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

geometry STDifference is directional. Two overlapping equal-area rectangles can produce equal remaining areas while retaining entirely different regions.

Read More
SQL SERVER - Datetime Function TODATETIMEOFFSET Example

SQL SERVER – Datetime Function TODATETIMEOFFSET Example

July 16, 2010
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

A quick example of the datetime function TODATETIMEOFFSET in SQL Server, and how it differs from SWITCHOFFSET when offsets change.

Read More
Previous 1 … 48 49 50 51 52 53 54 … 92 Next
  • Books
  • Testimonials
  • Privacy Policy

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