Re: [HACKERS] [6.5.2] join problems ...

Поиск
Список
Период
Сортировка
От The Hermit Hacker
Тема Re: [HACKERS] [6.5.2] join problems ...
Дата
Msg-id Pine.BSF.4.10.9909191046050.27097-100000@thelab.hub.org
обсуждение исходный текст
Ответ на Re: [HACKERS] [6.5.2] join problems ...  (Mike Mascari <mascarim@yahoo.com>)
Список pgsql-hackers
On Sun, 19 Sep 1999, Mike Mascari wrote:

> SELECT c.id, c.name, c.url 
> FROM aecEntMain a, aecWebEntry b, aecCategory c
> WHERE a.status LIKE 'active:ALL%'
> AND a.representation LIKE '%:ALL%'
> AND b.status LIKE 'active:ALL%'
> AND b.indid='$indid' 
> AND b.divid='$divid' 
> AND (a.id,a.mid = b.id,b.mid) 
> AND (b.catid,b.indid,b.divid = c.id,c.ppid,c.pid);

Only point I'd like to make (thanks for all the details, gives me alot to
work with...) is that the above is not valid in PostgreSQL, it seems...I
changed the last two AND lines to be:

AND (a.id=b.id AND a.mid=b.mid) 
AND (b.catid=c.id AND b.indid=c.ppid AND b.divid=c.pid)

and it eliminiated the error, but gave me zero results...

Please note, in my own defence...I'm working on cleaning up a mess created
by someone else using MySQL...what has to be done is a cleanup of the
tables themselves, but trying to fix some of the SQL first appears to be
the "route of least resistance" :(  Or, at least, it appeared to
be...starting to change my mind on that one heavily :)


Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org 
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org 



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

Предыдущее
От: "Jason Doller"
Дата:
Сообщение: PERL
Следующее
От: The Hermit Hacker
Дата:
Сообщение: All things equal, we are still alot slower then MySQL?