2009-03-29 4 views
1

어떤 옵션이 절차를 저장하기 위해 여러 값을 전달하는 SQL 2005에서 사용할 수있는 값SQL 다중 매개 변수는

사이비 코드를 C# 코드에서

List<string> myApplicationList; 
    .... (code to assign values) 
    **Construct parameter list** 
    Call stored procedure [spSelectMaster] with myApplicationList 

SQL 저장 프로 시저

CREATE PROCEDURE [Ecn].[spSelectMaster] 
     **Need to declare parameter here but not sure what this would be** 
    AS 
    BEGIN 
     SET NOCOUNT ON 
     SELECT * 
     FROM [dbo].[Master] 
     WHERE [Master].[ApplicationKey] IN (@ApplicationList) 
    END 
    GO 

미리 감사드립니다.

답변