SQL

Поиск
Список
Период
Сортировка
От Randy Jonasz
Тема SQL
Дата
Msg-id Pine.BSF.4.21.0011081124140.27289-100000@nietzsche.jaded.net
обсуждение исходный текст
Ответы RE: SQL
Список pgsql-general
Hi everyone,

I have a quick question. If anyone could help me that would be great.  I
have two tables in postgres.

table a
banid int4 primary key,
flags varchar(64)


table b
banid int4 foreign key
validate int4


What SQL statement would allow me to search for records in table a which
are not in table b.  The additional constraint is that I only want records
from table a which do not have 'v' in the flags column.

Here's an example SQL statement I've been using but I'm thinking it is
flawed.

SELECT distinct a.banid FROM a,b WHERE a.banid != b.banid AND a.flags NOT
LIKE '%v%';

Any help would be most welcome!

Randy Jonasz
Software Engineer
Click2net Inc.
Web:  http://www.click2net.com
Phone: (905) 271-3550

"You cannot possibly pay a philosopher what he's worth,
but try your best" -- Aristotle


В списке pgsql-general по дате отправления:

Предыдущее
От: "Jonathan Ellis"
Дата:
Сообщение: Re: how do you call one pltcl function from another?
Следующее
От: Mickaël Jouanne
Дата:
Сообщение: Probleme on ALTER