2009-04-16 [SQL] 將Stored Procedure的回傳table寫入temp table 10511 0 SQL 摘要:[SQL] 將Stored Procedure的回傳table寫入temp table CREATE PROCEDURE [dbo].[usp_noRCmail] @intFormNo INT, @strMailKind NVARCHAR(10) AS SET NOCOUNT ON DECLARE @strLinkedServer NVARCHAR(100) SELECT @strLinkedServer = ITEM_VALUE FROM CODE_LIST WHERE FIELD_NAME = 'LinkedServer' DECLARE @tbDetail Table (PCNO NVARCHAR(12), NBNO NVARCHAR(12)) INSERT INTO @tbDetail EXEC usp_GetDetail @strLinkedServer ,@intFormNo SQL 回首頁