Cool Tips‎ > ‎

Data Formatting

 

Title

Description

Applicability

 

Universal String Padder  

Pad a string with one or many of the same character as the beginning, end, middle or beginning and end. 

 

2000, 2005, 2008, 2008R2, 2012

 

Strip HTML tags from a string    

Basic function to remove all HTML tags.  Does not remove HTML embedded codes (eg &nbsp).

 

2000, 2005, 2008, 2008R2, 2012

 

Output SQL Results as HTML    

Converts the results set from a signel TSQL query to an HTML table.  Formatting can be customised.

 

2000, 2005, 2008, 2008R2, 2012

 

Dynamic Projection of Columns from a Query

 Allows the creation and execution of queires with dynmic SELECT statements (columns can be specified using wildcards).

 

2000, 2005, 2008, 2008R2, 2012

 

Quick and Dirty Results Graph

Create simulated bar graph directly in the results set.  For those times when Reporting Services is just too much trouble... 

 

2000, 2005, 2008, 2008R2, 2012

 

Cleaning and Formatting Phone Numbers

Cleaning/Formatting phone numbers on the fly using inline functions.  Originally written for SYBASE 15 so excludes some  of the more recent SQL Server TSQL techniques. 

 

 

2000, 2005, 2008, 2008R2, 2012

 

Enhanced Trim Function

Removes non-breaking spaces and all other control characters from the leading and trailing edges of a string.

 

2000, 2005, 2008, 2008R2, 2012

 

Get List of Months or Days

Returns an ordered list of months or days.  Ideal for report parameter lists.  Takes into account @@DATEFIRST setting.    

 

2000, 2005, 2008, 2008R2, 2012

 

 

 

 

 

 

 

 

 

Comments