sharad bhadalkar

sharad bhadalkar

  • NA
  • 37
  • 3.3k

Can only be specified when a column list is used and IDENTIT

Jun 4 2018 6:46 AM
I am tried following query
  1. SET IDENTITY_INSERT StudentSubjectRegistration ON  
  2. GO  
  3. Insert Into StudentSubjectRegistration  
  4. SELECT StudentSubjectRegistrationID, StudentSemesterRegistrationID, StudentRegCode, DivisionID, SemesterActivationID, SemesterID, BranchesSubjectDetailID,  
  5. SubjectDetailsID, SubjectCategoryID, SubjectGroupPID, NoOfAttempt, StudentStatusPID, ParentSubject, SubjectCode, FacultySubjectMappingID, OrgGrade,  
  6. OrgGradePoint, TotalMark, IsReExamRegistered, IsAllowReExam, IsEquivalence, IsMedicalReason, AwardedGrade, AwardedGradePoint, SubjectCredit,  
  7. EvalutionTypePID, CreditGradePoint, IsFeedBackSubmitted, YearID, CollegeID, IsEnabled, IsAccepted, IsAccRejected, AccComment, IsApproved, IsAppRejected,  
  8. AppComment, IsFreezed, IsArchived, CreatedBy, CreatedOn, ModifiedBy, ModifiedOn  
  9. FROM OEPIS.dbo.StudentSubjectRegistration  
  10. WHERE (StudentRegCode = 111615003) AND (SemesterActivationID = 239) AND (SemesterID = 190) AND (YearID = 12) AND (SubjectCode IN ('CSE-16005'))  
  11. Go  
  12. SET IDENTITY_INSERT StudentSubjectRegistration Off  
  13. 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

Answers (5)