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
Gouache painting: at a harbor quay, stone steps run down into calm water, with the waterline as zero

CEILING and FLOOR: Negative Values Change the Direction

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

CEILING and FLOOR follow numeric order even below zero. This example compares both boundaries with truncation and explicitly defines its displayed decimal types.

Read More
SQL SERVER - Get Information of Index of Tables and Indexed Columns

SQL SERVER – Get Information of Index of Tables and Indexed Columns

December 18, 2007
Pinal Dave
SQL Tips and Tricks
SQL Index, SQL Scripts

sp_helpindex is a handy stored procedure that shows every index on a table, its description and the indexed columns. One line of T-SQL does it.

Read More
A gouache inspection shed displays differently shaped vessels and their current fill levels beside a small lens.

SQL SERVER – T-SQL Script to Find Details About TempDB Information

December 17, 2007
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL TempDB

TempDB Information starts with the files and their actual locations. I inspect every data and log file before proposing changes.

Read More
SQL SERVER - FIX : Error : 3702 Cannot drop database because it is currently in use.

SQL SERVER – FIX : Error : 3702 Cannot drop database because it is currently in use.

December 7, 2007
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts

Error 3702 says you cannot drop database because it is in use. Switch to master, find other connections and drop it safely with this fix.

Read More
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
Two gravel approaches converge around a planted garden bed and continue as one path toward a blue courtyard door

OR in a JOIN: Preserve Matching Pairs When Rewriting

December 3, 2007
Pinal Dave
SQL Tips and Tricks
Developer, SQL Scripts, SQL Server

OR in a JOIN matches either key while returning each pair once. Compare NULL cases and pair counts before rewriting. Measure the actual plan only after proving the results.

Read More
Previous 1 … 326 327 328 329 330 331 332 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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