USE [MyDB]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[getCode]
(
@Code char(20),
@CodeType char(20)
)
RETURNS VARCHAR(200)
AS
BEGIN
RETURN
(
SELECT TOP 1 tbl_element_desc FROM codes_table WHERE tbl_type_code = @CodeType AND tbl_element = @Code
)
END
|