StudentSubjectRegistration

StudentSubjectRegistration

本文介绍了只能在使用列列表和IDENTITY_INSERT时指定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只能在使用列列表且IDENTITY_INSERT为ON时指定





什么我试过了:



我试过以下查询





SET IDENTITY_INSERT StudentSubjectRegistration ON



GO

插入StudentSubjectRegistration



SELECT StudentSubjectRegistrationID,StudentSemesterRegistrationID,StudentRegCode,DivisionID,SemesterActivationID,SemesterID,BranchesSubjectDetailID,

SubjectDetailsID,SubjectCategoryID,SubjectGroupPID,NoOfAttempt,StudentStatusPID,ParentSubject,SubjectCode,FacultySubjectMappingID,OrgGrade,

OrgGradePoint,TotalMark,IsReExamRegistered,IsAllowReExam,IsEquivalence,IsMedicalReason,AwardedGrade,AwardedGradePoint,SubjectCredit,

EvalutionTypePID,CreditGradePoint,IsFeedBackSubmitted,YearID,CollegeID ,IsEnabled,IsAccepted,IsAccRejected,AccComment,IsApproved,IsAppRejected,

AppComment,IsFreezed,IsArchived,CreatedBy,CreatedOn,ModifiedBy,ModifiedOn

来自OEPIS.dbo.StudentSubjectRegistration

WHERE(StudentRegCode = 111615003)AND(SemesterActivationID = 239)AND(SemesterID = 190)AND(YearID = 12)AND(SubjectCode IN('CSE-16005'))



Go

SET IDENTITY_INSERT StudentSubjectRegistration关闭

GO



但仍显示错误在sql中

只有在使用列列表并且IDENTITY_INSERT为ON时,才能指定表'StudentSubjectRegistration'中标识列的显式值。





所以请指导我

解决方案

can only be specified when a column list is used and IDENTITY_INSERT is ON



What I have tried:

I am tried following query


SET IDENTITY_INSERT StudentSubjectRegistration ON

GO
Insert Into StudentSubjectRegistration

SELECT StudentSubjectRegistrationID, StudentSemesterRegistrationID, StudentRegCode, DivisionID, SemesterActivationID, SemesterID, BranchesSubjectDetailID,
SubjectDetailsID, SubjectCategoryID, SubjectGroupPID, NoOfAttempt, StudentStatusPID, ParentSubject, SubjectCode, FacultySubjectMappingID, OrgGrade,
OrgGradePoint, TotalMark, IsReExamRegistered, IsAllowReExam, IsEquivalence, IsMedicalReason, AwardedGrade, AwardedGradePoint, SubjectCredit,
EvalutionTypePID, CreditGradePoint, IsFeedBackSubmitted, YearID, CollegeID, IsEnabled, IsAccepted, IsAccRejected, AccComment, IsApproved, IsAppRejected,
AppComment, IsFreezed, IsArchived, CreatedBy, CreatedOn, ModifiedBy, ModifiedOn
FROM OEPIS.dbo.StudentSubjectRegistration
WHERE (StudentRegCode = 111615003) AND (SemesterActivationID = 239) AND (SemesterID = 190) AND (YearID = 12) AND (SubjectCode IN ('CSE-16005'))

Go
SET IDENTITY_INSERT StudentSubjectRegistration Off
GO

But still error showing in sql
An explicit value for the identity column in table 'StudentSubjectRegistration' can only be specified when a column list is used and IDENTITY_INSERT is ON.


So please guide me

解决方案


这篇关于只能在使用列列表和IDENTITY_INSERT时指定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-25 11:25