Subject RE: [firebird-support] nested join sql help
Author Helen Borrie
At 03:17 PM 7/09/2003 +0100, you wrote:

>select n.UserID, b.text from Bugs b left outer join Notifications n on
>except that i need to specify a where clause so that non-null data is only
>returned in this column for a given user in the Notification data. e.g.
>for user 'T'
>UserID Text
> T Bug1
> <null> Bug2
> T Bug3
>i've experimented with 'union'ing 2 queries together using where
>n.UserID='T' and where n.UserID<>'T' but still not got what i want.
you're making this a lot harder than it is!

select n.UserID, b.text from Bugs b
left join Notifications n
and n.UserID = 'T'

will restrict the result set to just those involving 'T'.

But it's not clear whether in fact you want all rows where