Hi,
I have a table which has 10 columns and these 10 columns has alpha numeric and special characters (ascii values) - My client said all the column should have ONLY alpha numeric values.
Can you please help me for this? I am not sure how to eliminate ASCII values from alpha numeric values..
I have a function as below
CREATE FUNCTION [dbo].[fn_RemoveSplChars] (@s VARCHAR(256))
RETURNS VARCHAR(256)
BEGIN
IF @s IS NULL
RETURN NULL
DECLARE @p INT
SET @p = 0
WHILE @p <= 127
BEGIN
IF @p < 32 OR @p BETWEEN 33 AND 47 OR @p BETWEEN 58 AND 64 OR @p BETWEEN 91 AND 96 OR @p > 122
SET @s = REPLACE(@s, CHAR(@p), '')
SET @p = @p + 1
END
RETURN @s
END
But can you please tell me how to use this function to retrieve all the columns instead of a single column?