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

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: Mike Mascari <mascarim(at)yahoo(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] [6.5.2] join problems ...
Date: 1999-09-19 13:49:10
Message-ID: Pine.BSF.4.10.9909191046050.27097-100000@thelab.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)hub(dot)org secondary: scrappy(at){freebsd|postgresql}.org

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1999-09-19 14:39:56 All things equal, we are still alot slower then MySQL?
Previous Message Geocrawler.com 1999-09-19 13:04:53 Spam