2009년 1월 21일 수요일

SP_EXECUTESQL 공부..

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
ALTER PROCEDURE testABC
AS
DECLARE @qry nvarchar(1000)
DECLARE @parms nvarchar(500)
DECLARE @where varchar(1000)
DECLARE @outvalue int

SET @where = '1>0'SET @qry='select @totalCount = 100'SET @parms ='@totalCount int output '

Exec SP_EXECUTESQL @qry, @parms, @totalCount = @outvalue OutPut
select @outvalue
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

댓글 없음:

댓글 쓰기