Compare Page Revisions
« Older Revision - Back to Page History - Current Revision
/* select result = dbo.udsFileExtension('hello.vbs.txt.xml') */ ALTER function [dbo].[udsFileExtension] ( @file varchar(max) ) returns varchar(max) as begin declare @result varchar(max) ,@pos int select @pos = len(@file) - charindex('.', reverse(@file)) + 1 ,@result = case when @file like '%.%' then substring(@file, @pos, len(@file)) else '' end return @result end
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.