How do you find Fragmentation Information for a table in SQL Server 2005? DBCC SHOWCONTIG has limits, so I use sys.dm_db_index_physical_stats instead.
SQL SERVER – Execute Same Query and Statement Multiple Times Using Command GO
Need to run the same statement several times without copy and paste? Put a number after the command GO, like GO 5, and SQL Server runs the batch that many times.
SQL SERVER – 2005 – Introduction and Explanation to SYNONYM – Helpful T-SQL Feature for Developer
SQL Server 2005 added SYNONYM, a single-part name that replaces a long four part object name. I explain how it saves typing and shields code from changes.
geometry STIsClosed and STIsSimple: Ask Both Questions
geometry STIsClosed does not establish simplicity. These three complete line descriptions compare endpoint closure with self-intersection.
SQL SERVER – Quick Note on CROSS APPLY
A quick note on CROSS APPLY: think of it as an inner join to a table valued function that takes parameters, something a regular JOIN cannot do.
SQL SERVER – 2005 – Last Ran Query – Recently Ran Query
Want to see the last ran query on SQL Server 2005? This quick script uses sys.dm_exec_query_stats to list recent queries with the time each one ran.
geometry STEnvelope: A Bounding Box Includes Extra Space
geometry STEnvelope can include points outside the original shape. These two triangle tests keep envelope membership beside exact containment.







