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 wristwatch lying beside a torn-off paper calendar page on a wooden desk.

SQL SERVER – Get Time in Hour:Minute Format from a Datetime – Get Date Part Only from Datetime

August 6, 2009
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

Get the time in Hour:Minute Format, or just the date, from a DATETIME with CONVERT styles 108 and 101, or with the TIME and DATE types in SQL Server 2008.

Read More
Gouache painting: in the upper row they are ordered by the color of their base band, so the tallest candle with the earliest color stands first

MIN and MAX Text: Collation Chooses the Extremes

August 2, 2009
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

MIN and MAX text use collation ordering, not numeric magnitude. Compare digit strings, empty text and NULL using an explicit BIN2 contract.

Read More
Two groups of sage, blue and cream cloths hang above a table with a red cord.

Date Conversion Styles: Disambiguate Day and Month

July 31, 2009
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL NULL, SQL Scripts, SQL Server

Date conversion styles define how incoming text becomes a date. Compare month-first and day-first interpretations without guessing. Keep invalid dates separate from missing input.

Read More
Two ivory frames lie on a wooden table, one over blue woven cloth and one with a plain gray inset.

XQuery string-length: Count Content Without Markup

July 28, 2009
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Server, SQL XML

XQuery string-length counts the selected element string value. Seven bounded cases separate content from markup, empty elements from missing elements, and missing XML from existing documents.

Read More
Gouache painting: on a greenhouse bench a rectangular pane of glass lies beside an empty wooden frame of the same outer size, its four rails joined with open air inside

geometry STBoundary: A Polygon Edge Is a Different Shape

July 21, 2009
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STBoundary returns the edge of a shape as another geometry instance. I inspect that result independently from the source. A polygon’s boundary is not another filled polygon with the same area.

Read More
SQL Server Management Studio Query Results Window.

SQL SERVER – Get Last Running Query Based on SPID

July 19, 2009
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server DBCC, SQL System Table

How to see the last running query of another session based on its SPID, using @@SPID to find session IDs and DBCC INPUTBUFFER to read the query.

Read More
Unmarked wooden blocks in natural cream and slate tones stand in a row beside a red end block on textured off-white paper.

Decimal Multiplication: Precision Can Reduce the Result Scale

July 12, 2009
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server

Decimal Multiplication derives a result type from its operand types, and the precision limit can reduce the scale. I inspect three small products. A small numeric value does not necessarily imply a narrowly declared arithmetic result.

Read More
Previous 1 … 56 57 58 59 60 61 62 … 92 Next
  • Books
  • Testimonials
  • Privacy Policy

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