Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Sql Query to get exact Feedback

Author  Topic 

Swati Jain
Posting Yak Master

139 Posts

Posted - 2006-08-01 : 02:56:48
Hello all,

I want to display the feedback of faculties

in Lecture details there lectureName and its feedback
in batch_1, there are 2 faculties--->A,B
in batch_2 there are 2 faculties--->B,C

For lecture i am using following query SELECT "Batch"."batchID", "FacultyMaster"."firstName",Feedback.averagefeedback
FROM ("SIEIMSDev"."dbo"."Batch" "Batch" INNER JOIN "SIEIMSDev"."dbo"."FacultyMaster" "FacultyMaster" ON "Batch"."lectureFacultyID"="FacultyMaster"."facultyID") full outer join Feedback on Feedback.facultyid=facultymaster.facultyid


for lab i am using following query
SELECT "Batch"."batchID", "FacultyMaster"."firstName",Feedback.averagefeedback
FROM ("SIEIMSDev"."dbo"."Batch" "Batch" INNER JOIN "SIEIMSDev"."dbo"."FacultyMaster" "FacultyMaster" ON "Batch"."labFacultyID"="FacultyMaster"."facultyID") full outer join Feedback on Feedback.facultyid=facultymaster.facultyid


Now if i put the feedback for lecture B in batch_1
even if i dont put any feedback in batch_2 for lecture B
then also same feedback gets displayed for batch_2

Batch_1 lecture B Feedback
same for Batch_2(Here i dont give the feedback to lecture B in Batch_2
then also i get
Batch_2 lecture B Feedback
this should not happen for batch_2

What can i do?

Swati


chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-08-01 : 03:08:34
Is there any specific Reason for using Full Outer Join??

It will be better if you can post some sample data..??

Chirag
Go to Top of Page
   

- Advertisement -