There is not any sense without UI. But you can use the function to get the result by passing appropriate parametersCREATE FUNCTION Fun_Remove( @String VARCHAR(100), @Pos INT )RETURNS VARCHAR(100)ASBEGIN DECLARE @OutResult AS VARCHAR(100) SELECT @OutResult = REPLACE( @String, RIGHT(LEFT( @String , @Pos),1),'') RETURN @OutResultEND
I am assuming your requirement as its not that much clear.Please explain more like what if string has only 4 character and int is passed more than 4 ?and you can call another function or procedure to get the last character from table where meaning of each character is stored.Vaibhav TTo walk FAST walk ALONE To walk FAR walk TOGETHER