create function in microsoft sql server

Solutions on MaxInterview for create function in microsoft sql server by the best coders in the world

showing results for - "create function in microsoft sql server"
Elías
31 Jul 2017
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