set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER FUNCTION [dbo].[GET_KIND_CODE_PROC](@b_id int) RETURNS VARCHAR(1000) AS Begin Declare @tot int, @idx int, @rtnValue varchar(2000) --@b_id int, --SET @b_id = 51320 SET @idx = 1 SET @rtnValue = N'' Declare @tbTemp Table ( idx int primary key identity , jk_code nvarchar(100) ) INSERT INTO @tbTemp Select BK.jk_code From dbo.ALBA_BOARD_KIND_TB BK WI..