3
Reply

problem in join query

baskaran chellasamy

baskaran chellasamy

Dec 8 2012 6:28 AM
2k
Hi friends
the below is my join query for getting some result
 
create
procedure sp_bindexamclass(@classid int,@examid int) as begin select en.ExamName,St.Standered_name,Sr.SubjectName,ec.Maximummark,ec.Minimummark from Standered_details St inner join ExamClasssetting_details ec on St.Standered_id=ec.Classid inner join SubjectRegistration_details Sr on Sr.SubjectCode=ec.subjectid inner join ExamNameSetting_details en on en.ExamId=ec.ExamId where ec.Classid=@classid and ec.ExamId=@examid   end  

 

Table relation is
 
1.standered details
relational key is
standered_id
to
 classid 
(fk) of Examclasssetting_details
2.SubjectRegistration_details
relational key is
 subjectcode
to
 subjectid 
of
Examclasssetting_details
3 .ExamNamesetting_details
relational key is
ExamId
to
 ExamId
of Examclasssetting_deatails
 
all the table contains data for join query. but i couldnt get the desired result. what is the problem in join query.

Answers (3)