|
|
|
|
î¤éÞ / 2013-11-29 / ¿ÀÈÄ 2:14:54 / 61.78.108.65
Á¶È¸¼ö : 811
|
[±âŸ] ¼¼·Î·Î µÈ µ¥ÀÌÅ͸¦ °¡·Î·Î |
CREATE FUNCTION dbo.abc(@Class AS INT)
RETURNS VARCHAR(8000)
AS
BEGIN
DECLARE @result VARCHAR(8000)
SELECT @result = COALESCE(@result + ', ', '') + C_Code_N
FROM T_KDRGMaster2013_M
WHERE C_Class_N = @Class
RETURN @result
END
¸ÕÀú À§¿Í °°Àº ÇÔ¼ö¸¦ ¸¸µé¾î µÐ ÈÄ
¾Æ·¡¿Í °°Àº Äõ¸®¸¦ ½ÇÇàÇϸé
¼¼·Î·Î µÈ µ¥ÀÌÅ͸¦ °¡·Î·Î ¹¾î¼ º¼ ¼ö ÀÖ´Ù.
SELECT C_Class_N, dbo.abc(C_Class_N) FROM T_KDRGMaster2013_M GROUP BY C_Class_N
|
|
|