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
 Transact-SQL (2000)
 sql outer join

Author  Topic 

cipriani1984
Constraint Violating Yak Guru

304 Posts

Posted - 2008-12-01 : 05:15:30
Hi,

Im having problems with a outer join, im trying to subtract (take out the differences between 2 tables).

I have 2 register tables and trying to pick out which register hasnt got any marks, and since cant really use where code = null. Im using left outer join function.

Query1 left outer Query2 on acad_period, register_id, register_group, week_no. query1 has all the registers listed, and query2 has all the registers with marks on them. Im using left outer join but it doesnt bring back anything. I tried using NOT IN statement but cant use it for more than one field? Any ideas?

Query 1

SELECT acad_period, register_id, register_group, week_no, day_of_week
FROM A
WHERE acad_period = '08/09'

Query 2

SELECT acad_period, register_id, register_group, week_no, day_of_week, dbo.sttdstud.absence_code
FROM A
WHERE acad_period = '08/09'

thanks cipriani

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-01 : 05:41:59
Duplicate.please dont cross post

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=115418
Go to Top of Page
   

- Advertisement -