Re: [GENERAL] Negating the list of selected rows of a join

1999-03-14 Thread Ulf Mehlig
Clark Evans <[EMAIL PROTECTED]>/Ulf Mehlig <[EMAIL PROTECTED]> wrote: > > > Hope this will do the trick. > > > > Maybe not -- doesn't that mean, that the query won't return a > > single row in case there is *any* pair of equal names in both > > tables?! > > No. It's a correlated sub-que

Re: [GENERAL] Negating the list of selected rows of a join

1999-03-14 Thread Clark Evans
Manuel Lemos wrote: > > I want to list the rows of a table with a text field whose values do not > exist in a similar field of another table. Basically what I want to get > is negated results of a join. Ulf Mehlig wrote: >SELECT name FROM table_a >WHERE name NOT IN (SELECT name FROM ta

Re: [GENERAL] Negating the list of selected rows of a join

1999-03-14 Thread Ulf Mehlig
Clark Evans <[EMAIL PROTECTED]>: > Manuel Lemos wrote: > > How can I make a query that works the way I want all the time, even for the > > case when table_b is empty? > > SELECT table_a.name, table_a.age > FROM table_a > WHERE NOT EXISTS ( > SELECT 'x' > FROM

Re: [GENERAL] Negating the list of selected rows of a join

1999-03-14 Thread Ulf Mehlig
Manuel Lemos <[EMAIL PROTECTED]> wrote: > I want to list the rows of a table with a text field whose values do not > exist in a similar field of another table. Basically what I want to get > is negated results of a join. [...] > It worked except for the case when table_b is empty. In this c

Re: [GENERAL] Negating the list of selected rows of a join

1999-03-14 Thread Clark Evans
Manuel Lemos wrote: > How can I make a query that works the way I want all the time, even for the > case when table_b is empty? SELECT table_a.name, table_a.age FROM table_a WHERE NOT EXISTS ( SELECT 'x' FROM table_b WHERE table_b.name = table_a.name

[GENERAL] Negating the list of selected rows of a join

1999-03-14 Thread Manuel Lemos
Hello, I want to list the rows of a table with a text field whose values do not exist in a similar field of another table. Basically what I want to get is negated results of a join. Lets say the tables table_a and table_b have the field name. table_a table_b name age name - ---