You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 lines
1.5 KiB

USE [FastMoneyPro_Remit]
GO
/****** Object: UserDefinedFunction [dbo].[GetBranchName] Script Date: 2/29/2024 5:15:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date, ,>
-- Description: <Description, ,>
-- =============================================
ALTER function [dbo].[GetBranchName](@ID int)
returns char(1000)
as
begin
declare @Full_Name as varchar(500)
if @ID is null or @ID=0 or @ID=''
begin
set @Full_Name='All Agents'
return @Full_Name;
end
SELECT @Full_Name = BRANCH_NAME + ' - ' + BRANCH_CODE1
FROM API_BANK_BRANCH_LIST WITH (NOLOCK)
WHERE BRANCH_ID = @ID
return @Full_Name
end