0
//Table valued parameter creation
CREATE TYPE [dbo].[tblFactIds] AS TABLE(
[FactId] [int] NULL
//using TVP in SP,just declaring a var of type TVP which i created
DECLARE @FactIds As tblFactIds;//error: parameter or variable has an invalid datatype //tried by adding READONLY also
INSERT INTO @FactIds (FactId)
SELECT * FROM Sampletable
錯誤是什麼我得到:必須聲明表變量@FactIds 請大家幫我出這個問題。表值參數錯誤參數或變量具有無效的數據類型
會嘗試..... – Lalita 2015-03-13 12:28:56
@Annem重要:只運行'DECLARE TYPE',然後運行查詢的其他部分 – xanatos 2015-03-13 12:29:47
我以類似的方式創建了TVP,但在發佈問題時它已經錯過了大括號 – Lalita 2015-03-13 12:31:03