1CREATE FUNCTION dbo.StripWWWandCom (@input VARCHAR(250))
2RETURNS VARCHAR(250)
3AS BEGIN
4 DECLARE @Work VARCHAR(250)
5
6 SET @Work = @Input
7
8 SET @Work = REPLACE(@Work, 'www.', '')
9 SET @Work = REPLACE(@Work, '.com', '')
10
11 RETURN @work
12END
13