Mike Eghtebas
asked on
Bulk insert
The following is a proc to accept a data table as parameter and insert it to another table:
When I run this code, I get "Parameter or variable '@TableType' has an invalid data type."
Q1: What is correct syntax for line @TableType TableType readonly?
Q2: Could you please code to create a sample table with two lines of data so I could test this proc?
Note that fileID is identity column.
CREATE PROCEDURE [dbo].[InsertData]
@TableType TableType readonly
AS
BEGIN
insert into [dbo].DataList select * from @TableType;
END
When I run this code, I get "Parameter or variable '@TableType' has an invalid data type."
Q1: What is correct syntax for line @TableType TableType readonly?
Q2: Could you please code to create a sample table with two lines of data so I could test this proc?
fileID filename createdOn
1 File_1 2014-02-26
2 File_2 2014-03-28
Note that fileID is identity column.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
eghtebas, do you still need help with this question?