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 - UDF - Remove Duplicate Chars From String

SQL SERVER – UDF – Remove Duplicate Chars From String

December 5, 2007
Pinal Dave
SQL Tips and Tricks
Duplicate Records, SQL Function, SQL Scripts, SQL String

A reader, Virendra Chauhan, shared a UDF that removes duplicate chars from one large string. Here is his REMOVE_DUPLICATE_INSTR function and how to call it.

Read More
Gouache painting: seen from above, two identical round paddock fences stand side by side on a green hill

ReorientObject: Swap a Geographic Ring’s Interior

December 4, 2007
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

ReorientObject swaps a geography polygon’s interior and exterior. Compare inside and outside witnesses, then reorient twice to restore membership.

Read More
A ring cake with white icing and one cherry on top, on a white plate beside a knife.

STPointOnSurface: Choose a Point Inside a Polygon

December 1, 2007
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

STPointOnSurface returns an interior point. Check a polygon with a hole, a simple polygon and an empty geometry without assuming exact coordinates.

Read More
Two wooden trays of blue and pale stones, with one loose blue stone between them.

Multiset Intersection: Keep the Matching Duplicate Occurrences

November 24, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Joins, SQL Scripts, SQL Server

Multiset intersection keeps the duplicate count shared by both inputs rather than returning each common value once. I pair numbered occurrences to express that requirement. The result should contain the smaller count for each equivalent value.

Read More
Two rows of small ceramic vessels on a wooden tray beside folded woven cloth with a brass clasp.

Binary Conversion Styles: Hex With and Without 0x

November 23, 2007
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Server

Binary conversion styles control hexadecimal prefixes. Pair the output and input styles, preserve empty bytes and verify a complete round trip.

Read More
Gouache painting: two river sluice gates stand side by side

DEGREES: Preserve Fractions When Converting Angles

November 20, 2007
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

DEGREES converts radians into degrees. An integer radian argument can narrow the output, while a float argument retains an approximate fractional degree value.

Read More
A knife leveling flour in the smallest of a set of measuring spoons

Decimal Precision and Rounding in SQL Server

November 12, 2007
Pinal Dave
SQL Tips and Tricks
Mathematical Function, SQL Datatype, SQL Function, SQL Server

Decimal precision in SQL Server controls arithmetic results and rounding; use explicit scales, test boundaries, and compare money with decimal.

Read More
Previous 1 … 75 76 77 78 79 80 81 … 92 Next
  • Books
  • Testimonials
  • Privacy Policy

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