Function

linkaiyi
Follow

Write functions in T SQL

CREATE FUNCTION dbo.StripWWWandCom (@input VARCHAR(250))
RETURNS VARCHAR(250)
AS BEGIN
    DECLARE @Work VARCHAR(250)

    SET @Work = @Input

    SET @Work = REPLACE(@Work, 'www.', '')
    SET @Work = REPLACE(@Work, '.com', '')

    RETURN @work
END
Object has 0 attachments

Was this article helpful?

This article is viewed 57 times!

0 Comments

Leave a Comment

Support