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.

23 lines
405 B

  1. SET ANSI_NULLS ON
  2. GO
  3. SET QUOTED_IDENTIFIER ON
  4. GO
  5. CREATE function [dbo].[GetBankNameFromId](@ID int)
  6. returns char(1000)
  7. as
  8. begin
  9. declare @Full_Name as varchar(500)
  10. if @ID is null or @ID=0 or @ID=''
  11. begin
  12. set @Full_Name='All Agents'
  13. return @Full_Name;
  14. end
  15. set @Full_Name = ( select BANK_NAME from API_BANK_LIST_MASTER with (nolock)
  16. WHERE MASTER_BANK_ID = @ID)
  17. return @Full_Name
  18. end