Intersoft Development, Inc. Home Link
If you are currently using SQL-Server for your business applications, are you sure you are realizing its full potential? SQL 2000 and 2005 are quite powerful, and now SQL Server 2008 extends this power...
Read More...
Intersoft Development emphatically recommends CodeGear Delphi for custom software development! With the newest Embarcadero Delphi 2010 release, Delphi continues its tradition of providing industry-leading unmatched software development capabilities in this RAD programming language and IDE.

Delphi 2010 builds upon the already excellent features and capabilities of Delphi 2009 by adding touch/gesturing support to recent Delphi language enhancements for Generics, Closures / Anonymous-Methods, Unicode, and much more...
Read More...
CEO's Blog Topics Below
Recent Blog Topics:
Looking for affordable professional 2D/3D CAD Software? VariCAD is a full-featured comprehensive 2D/3D CAD package offering:
  • Windows / Linux support
  • 3D modeling with automatic export 2D.
  • Sizing of mechanical components.
  • Plus, predefined library of commnon parts.
  • Quick and intuitive 3D/2D GUI
  • Compatibility with DWG, DXF, IGES, STEP and STL...

FREE 3D CAD Software Trial and Sale - VariCAD

Free Software, Source Code, and Best-Practice Documentation Index from your
Cleveland Software, Database, Web Design, Consulting, and SQL / Delphi Experts

SQL Server - User Defined Function:
Format Social Security Number

Converts unformatted Social-Security Numbers (i.e., no embedded hyphens) to standard "xxx-xx-xxxx"
SSN display format commonly seen on reports and GUIs.

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[udfConvertUnformattedSSNToFormattedSSN]') and xtype in (N'FN', N'IF', N'TF'))
drop function [dbo].[udfConvertUnformattedSSNToFormattedSSN]
GO

-- **********************************************************************************************************************
-- Convert unformatted Social-Security Numbers (i.e., no embedded hyphens) to standard "xxx-xx-xxxx" SSN display format.
-- Example: 
--	PRINT dbo.udfConvertUnformattedSSNToFormattedSSN('123456789') --returns '123-45-6789' 
-- ***********************************************************************************************************************
CREATE FUNCTION udfConvertUnformattedSSNToFormattedSSN
	(@cSSN	CHAR(9))
	RETURNS	CHAR(11)
AS
BEGIN
     RETURN SUBSTRING(@cSSN, 1, 3) + '-' + SUBSTRING(@cSSN, 4, 2) + '-' + SUBSTRING(@cSSN, 6,4) 
END
 
.NET framework version: 2.0.50727.3615