Hi!
Paul van den Berg wrote:
>
> >
> > This is the situation:
> >
> > I have 2 tables, a and b as following:
> >
> > --------------
> > | a |
> > --------------
> > | eid | name |
> > --------------
> >
> >
> > ------------------
> > | b |
> > ------------------
> > | id | gid | eid |
> > ------------------
> >
> > *) a.eid and b.id are primary keys
> >
> > *) b.eid points to a.eid entries
> >
> > Now my wish:
> >
> > *) b.gid = fixed given value
> >
> > *) i want all entries from a , which are NOT referenced by any entries
> > from b.eid where b.gid = fixed given value
> >
> > Is this possible with only one sql-statement?
> Is this wat you want?
>
> select a.eid from a left join b using (eid)
> where b.gid = <fixed> and b.eid is null
No, i already tried this before and it always gives back an empty set :(
When you skip the "and b.eid is null" clause you will see, that this
statement exactly
selects all entries from a which ARE referenced from b.
--
greetings - WEMMER Alexander <[EMAIL PROTECTED]>
Telematik Student at the Technical University of Graz, Austria.
https://wemmer.at/
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php