Re: [SQL] This SQL works under Mysql, not Postgresql.

2008-01-25 Thread Scott Marlowe
On Jan 25, 2008 10:11 AM, acec acec [EMAIL PROTECTED] 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,

Re: [SQL] This SQL works under Mysql, not Postgresql.

2008-01-25 Thread acec acec
Maybe it is not legal sql according to SQL standard, but it works under mysql, I try to port it into Postgresql. --- Scott Marlowe [EMAIL PROTECTED] wrote: On Jan 25, 2008 10:11 AM, acec acec [EMAIL PROTECTED] wrote: I have the following sql, which works fine under mysql database:

Re: [SQL] This SQL works under Mysql, not Postgresql.

2008-01-25 Thread Scott Marlowe
Please keep replies on list, others may have answers I do not. On Jan 25, 2008 10:29 AM, acec acec [EMAIL PROTECTED] wrote: --- Scott Marlowe [EMAIL PROTECTED] wrote: On Jan 25, 2008 10:11 AM, acec acec [EMAIL PROTECTED] wrote: I have the following sql, which works fine under mysql

[SQL] This SQL works under Mysql, not Postgresql.

2008-01-25 Thread acec acec
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

Re: [SQL] This SQL works under Mysql, not Postgresql.

2008-01-25 Thread Oliveiros Cristina
, January 25, 2008 4:23 PM Subject: Re: [SQL] This SQL works under Mysql, not Postgresql. On Jan 25, 2008 10:11 AM, acec acec [EMAIL PROTECTED] 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

Re: [SQL] This SQL works under Mysql, not Postgresql.

2008-01-25 Thread Tom Lane
Scott Marlowe [EMAIL PROTECTED] writes: On Jan 25, 2008 10:11 AM, acec acec [EMAIL PROTECTED] 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 =