Re: Syntax problem for a newbie

Поиск
Список
Период
Сортировка
От Russ Brown
Тема Re: Syntax problem for a newbie
Дата
Msg-id 1146856738.15805.92.camel@aeolian.my-domain.com
обсуждение исходный текст
Ответ на Re: Syntax problem for a newbie  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Syntax problem for a newbie  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Fri, 2006-05-05 at 12:49 -0400, Tom Lane wrote:
> "Fred" <frederic.fleche@gmail.com> writes:
> > I have a syntax problem but I don't find the clue.
> > Actually I adapt an mySQL query to a postgreSQL but I got a message
> > error that I can't interpret.
>
> > SELECT g.id, t1.name, substring(g.path, 1, (6*(-1+l.id)) + 5) as
> > subpath,l.id-1 as level
> > FROM  graph_path g
> >     INNER JOIN term AS t1
> >     INNER JOIN term AS t2  ON (t2.id = g.term2_id)
> >     INNER JOIN levels l ON (substring(path, 1+(6*(-1+l.id)), 5) = t1.id
> >  AND g.distance+1 >= l.id)
> > WHERE t2.name = 'blood_coagulation' and g.term1_id=1
> > ORDER BY g.id, subpath;
>
> You're short an ON condition: there has to be an ON for every JOIN.
> Or turn the first INNER JOIN into a CROSS JOIN, so it doesn't need an ON.
>
> Does MySQL really accept that as-is?  (Standards compliance was never
> their strong point :-()
>

Yes, MySQL (4.1.14) quite happily accepts that as-is...

--

Russ


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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Unify distant Postgres databases
Следующее
От: Brendan Duddridge
Дата:
Сообщение: can't reindex a couple of tables