我正在使用SQL Server 2008和C#ADO.NET来实现这一目标。
我想使用存储过程将这些数据插入到表SAVEDATA
谢谢
Srosh
答案 0 :(得分:1)
好吧,您只需编写一个INSERT
语句,然后从该表中选择要传入的数据:
CREATE PROCEDURE [dbo].[spSave] (@theDATA As [dbo].[TVP] Readonly)
AS
BEGIN
INSERT INTO dbo.SaveResponse(ID, myQuestion, PersonWhoResponses,
Response, [User], [DateTime])
SELECT
ID, myQuestion, PersonWhoResponses,
Response, [User], [DateTime]
FROM
@theDATA
END
答案 1 :(得分:0)
INSERT INTO @theData (
SELECT [ID], [myQuestion], [PersonWhoResponses], [Response] , [User], [DateTime]
FROM SAVERESPONSE
WHERE ...
)