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:
Full String Trim

Perform a FULL Trim on a string, removing both leading (LTRIM) and trailing (RTRIM) whitespace in
one single Trim function much like Oracle and others.

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

-- ******************************************************************************************************************************/
-- Perform a FULL Trim on a string, removing both leading and trailing whitespace.
-- Microsoft SQL Server only provides left & right (LTRIM , RTRIM) functions natively.
-- This helper function makes up for what Oracle and others provide as a built-in "Trim" function.
-- Example:
--	PRINT dbo.udfTrim(' String with leading / trailing whitespace     ')
--                returns 'String with leading / trailing whitespace'
-- *****************************************************************************************************************************/
CREATE FUNCTION udfTrim
	(@vStringToTrim VARCHAR(500))
	RETURNS VARCHAR(500)
AS
BEGIN
	RETURN LTRIM(RTRIM(@vStringToTrim))
END
 
.NET framework version: 2.0.50727.3615