ELSE IF UPPER(@NameFormat) = 'FL'
BEGIN
IF @C_fname <> ''
SET @VSTR = @C_fname
IF @C_lname <> ''
BEGIN
IF @VSTR <> ''
SET @VSTR = @VSTR + ' ' + @C_lname
ELSE
SET @VSTR = @C_lname
END
IF UPPER(@Case) = 'U'
SET @VSTR = UPPER(@VSTR)
ELSE IF UPPER(@Case) = 'I'
SET @VSTR = DBO.FN_GET_INITCAP('', @VSTR)
ELSE
SET @VSTR = @VSTR
END
ELSE
BEGIN
IF @C_fname <> ''
SET @VSTR = @C_fname
IF @C_mname <> ''
BEGIN
IF @VSTR <> ''
SET @VSTR = @VSTR + ' ' + @C_mname
ELSE
SET @VSTR = @C_mname
END
IF @C_lname <> ''
BEGIN
IF @VSTR <> ''
SET @VSTR = @VSTR + ' ' + @C_lname
ELSE
SET @VSTR = @C_lname
END
IF UPPER(@Case) = 'U'
SET @VSTR = UPPER(coalesce(@VSTR,@C_Bname,@C_FullName))
ELSE IF UPPER(@Case) = 'I'
SET @VSTR = DBO.FN_GET_INITCAP('', coalesce(@VSTR,@C_Bname,@C_FullName))
ELSE
SET @VSTR = coalesce(@VSTR,@C_Bname,@C_FullName)
END
No comments:
Post a Comment