- Create FUNCTION [dbo].[GetFullNameWithNoSpace]
- (
- @First_Name varchar(50),
- @Middle_Name varchar(50),
- @Last_Name varchar(50)
- )
- RETURNS Varchar(152)
- AS
- begin
- Declare @outTime Varchar(152);
- SELECT @outTime= REPLACE(RTRIM(COALESCE(@First_Name + ' ', '') +
- COALESCE(@Middle_Name + ' ', '') +
- COALESCE(@Last_Name+ ' ', '') ), ' ', ' ')
- RETURN @outTime
- END
- GO
- SELECT dbo.[GetFullNameWithNoSpace]('ashish','','Srivastava')
No comments:
Post a Comment