HiI have this function [quote]CREATE FUNCTION [dbo].[fnFormatMobileNumber] (@phone VARCHAR(15))RETURNS VARCHAR(15)AS BEGINDECLARE @Formatted VARCHAR(15)IF (LEN(@phone) > 10) SET @Formatted = '0' + SUBSTRING(@phone,3,9) ELSE SET @Formatted = @phoneRETURN @FormattedEND select [dbo].[fnFormatMobileNumber](0842507889) [/quote]I get 842507889 back when I execute this, and I'm expecting 0842507889, please help
↧