Re: This SQL works under Mysql, not Postgresql.

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: This SQL works under Mysql, not Postgresql.
Дата
Msg-id dcc563d10801250823p3694ee4flc5029b93594ecf66@mail.gmail.com
обсуждение исходный текст
Ответ на This SQL works under Mysql, not Postgresql.  (acec acec <tomcatacec@yahoo.ca>)
Ответы Re: This SQL works under Mysql, not Postgresql.  (acec acec <tomcatacec@yahoo.ca>)
Re: This SQL works under Mysql, not Postgresql.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
On Jan 25, 2008 10:11 AM, acec acec <tomcatacec@yahoo.ca> wrote:
> I have the following sql, which works fine under mysql
> database:
> SELECT sa.ID, suv.TOTAL as VOICE_TOTAL, sus.TOTAL as
> SMS_TOTAL FROM SUB_ACCOUNT sa INNER JOIN SUBSCRIBER s
> ON (sa.ID = s.SUB_ACCOUNT_ID) LEFT JOIN (SERVICE suv,
> SERVICE sus) ON (sa.ID = suv.SUB_ACC_ID AND
> suv.SERVICE_ID = 0 AND sa.ID = sus.SUB_ACC_ID AND
> sus.SERVICE_ID = 1) WHERE s.TELEPHONE = '111111111';
> When I ran it under postgresql, which gave me "ERROR:
> syntax error at or near"
> It looks like I could not put two table on LEFT JOIN:
> LEFT JOIN (SERVICE suv, SERVICE sus)
>
> Do you have any suggestion for this problem?

Is that legal SQL?  I've never seen anything like that before...


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

Предыдущее
От: Gary Stainburn
Дата:
Сообщение: Re: regex_replace problem -additional
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: regex_replace problem -additional