Имя столбца или количество предоставленных значений не соответствует определению таблицы.
StudentTable
CREATE TABLE [Student].[StudentDetails]( [StudentId] [int] IDENTITY(1,1) NOT NULL, [Name] [varchar](35) NULL, [IDNo] [varchar](10) NULL, [NameofGuardian] [varchar](50) NULL, [AddressofCommunication] [varchar](200) NULL, [MobileNumber] [varchar](50) NULL, [LandlineNumber] [varchar](20) NULL, [Email] [varchar](50) NULL, [AdmissionYear] [varchar](20) NULL, [SectionID] [int] NULL, [ClassID] [int] NULL, [IsActive] [bit] NULL, [IsDeleted] [bit] NULL, [CreatedBy] [int] NULL, [CreationDate] [datetime] NULL, [ModifiedBy] [int] NULL, [ModifiedDate] [datetime] NULL )
ОПРЕДЕЛЯЕМЫЙ ПОЛЬЗОВАТЕЛЕМ ТИП ТАБЛИЦЫ
CREATE TYPE [Student].[InsertBulkType] AS TABLE( [Name] [varchar](35) NULL, [IDNo] [varchar](10) NULL, [NameofGuardian] [varchar](50) NULL, [AddressofCommunication] [varchar](200) NULL, [MobileNumber] [varchar](50) NULL, [LandlineNumber] [varchar](20) NULL, [Email] [varchar](50) NULL, [AdmissionYear] [varchar](20) NULL, [SectionID] [int] NULL, [ClassID] [int] NULL )
когда я создаю процедуру для массовой вставки ниже пришла ошибка
это моя процедура
Create PROCEDURE [Student].[InsertBulkStudent] @tblStudent InsertBulkType READONLY AS BEGIN INSERT INTO StudentDetails SELECT Name,IDNo,NameofGuardian,AddressofCommunication,MobileNumber,LandlineNumber, Email,AdmissionYear,SectionID,ClassID FROM @tblStudent end
ошибка есть
Msg 213, Level 16, State 1, Procedure InsertBulkStudent, Line 9 Column name or number of supplied values does not match table definition.
Что я уже пробовал:
Msg 213, Level 16, State 1, Procedure InsertBulkStudent, Line 9 Column name or number of supplied values does not match table definition.