Hello,
I am trying to execute an SQL query that contains nested joins, but I
get parser error for some reason.
Below is the query I am trying to execute and the error I am getting:
SELECT media
FROM    (dtrowmedia a INNER JOIN dtrow b ON (a.dtrow = b.objectid)) c
                INNER JOIN dtcol d ON (c.dtcol = d.objectid)

psql: ERROR: parser: parse error at or near "inner"

Note that  the following query executes with no errors:
SELECT media
FROM    dtrowmedia a INNER JOIN dtrow b ON (a.dtrow = b.objectid)
                INNER JOIN dtcol d ON (b.dtcol = d.objectid)

What am I doing wrong?
Please help me get it to work.
Thanks

Oleg


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to