Hi
Bandi
Thanks for your reply. How to update following tables.
USE TEST
CREATE TABLE SUBJECTLIST
(
SubId int primary key identity(1,1),
SubName varchar(20)
)
Insert into SUBJECTLIST values('Tamil')
Insert into SUBJECTLIST values('English')
Insert into SUBJECTLIST values('Maths')
Insert into SUBJECTLIST values('Science')
Insert into SUBJECTLIST values('Social')
--SELECT * from SUBJECTLIST
CREATE TABLE SUBJECTASSIGN
(
SubAssId int Primary key identity(1,1),
SubId int,
SubAssgetdate datetime,
StudentId int
)
Insert into SUBJECTASSIGN values(1,GETDATE(),101)
Insert into SUBJECTASSIGN values(2,GETDATE()+1,102)
Insert into SUBJECTASSIGN values(1,GETDATE()+2,103)
Insert into SUBJECTASSIGN values(1,GETDATE()+1,104)
Insert into SUBJECTASSIGN values(3,GETDATE(),105)
Insert into SUBJECTASSIGN values(2,GETDATE(),108)
Insert into SUBJECTASSIGN values(4,GETDATE(),101)
Insert into SUBJECTASSIGN values(5,GETDATE()+3,101)
Insert into SUBJECTASSIGN values(6,GETDATE(),107)
Insert into SUBJECTASSIGN values(7,GETDATE(),102)
CREATE TABLE SUBJECTPROCESSASSIGN
(
SubProcId int Primary key identity(1,1),
SubId int,
StudentId int NULL
)
Insert into SUBJECTPROCESSASSIGN values(1,0)
Insert into SUBJECTPROCESSASSIGN values(2,0)
Insert into SUBJECTPROCESSASSIGN values(1,0)
Insert into SUBJECTPROCESSASSIGN values(3,0)
Insert into SUBJECTPROCESSASSIGN values(4,0)
Insert into SUBJECTPROCESSASSIGN values(1,0)
Insert into SUBJECTPROCESSASSIGN values(2,0)
Insert into SUBJECTPROCESSASSIGN values(3,0)
Insert into SUBJECTPROCESSASSIGN values(2,0)
Insert into SUBJECTPROCESSASSIGN values(4,0)
Insert into SUBJECTPROCESSASSIGN values(5,0)
Insert into SUBJECTPROCESSASSIGN values(5,0)
Insert into SUBJECTPROCESSASSIGN values(2,0)
--I have Update StudentId For this Table SUBJECTPROCESSASSIGN but i need joins this tables(SUBJECTLIST,SUBJECTASSIGN,SUBJECTPROCESSASSIGN)
-- for all table match this field only SubId
Mark as Answer if its helpful to you
Kumaraspcode2009@gmail.com