Friday, January 29, 2010

Formatting as Currency

If you need to format a number as currency, do this:

declare @d money set @d=50000.52
select '$' + convert(varchar(50), @d,1)

Result: $50,000.52

Though it should be noted that usually, formatting is a front-end task, and should not to be relegated to the database as a matter of best practice.

Wednesday, January 06, 2010

How to Install Windows Service

This article was very helpful in showing how to create an installer file for a widows service application.