SQL
Declare
@s_cd varchar(100),
@s_nm varchar(100)
select @s_cd = isnull(s_CD,'') from T_TBA where NO = 1
--set @s_cd='001'
set @s_nm=''
select @s_nm = @s_nm+','+ rtrim(A.S_NM) from (select S_CD, S_NM from M_TAB where s_CD =@s_cd ) A where A.S_CD in ('11','12','13','14')
print @s_nm