Re: problem join - Mailing list pgsql-sql

From Osvaldo Rosario Kussama
Subject Re: problem join
Date
Msg-id 46AA138D.3070601@yahoo.com.br
Whole thread Raw
In response to problem join  (chester c young <chestercyoung@yahoo.com>)
List pgsql-sql
chester c young escreveu:
> having problem joining these correctly:
> 
> schedule
> - cal_id references calendar not null
> - usr_id references users not null
> = unique( calZ_id, usr_id )
> - result_no not null
> 
> activity
> - cal_id references calendar not null
> - usr_id references users not null
> = unique( cal_id, usr_id )
> - from_ts timestamp not null
> 
> trying to join
> - cal_id
> - usr_id
> - schedule.result_no (might be null)
> - activity.from_ts (might be null)
> where schedule.usr_id = activity.usr_id would result in one row
> 



Try:
SELECT * FROM schedule FULL OUTER JOIN activity              USING (cal_id, usr_id) ....

Osvaldo



pgsql-sql by date:

Previous
From: Kristo Kaiv
Date:
Subject: Re: strange result for select * from table where id=random()*900
Next
From: Carol Cheung
Date:
Subject: group by range of values