0

I have a query like this(which works in Oracle properly):

...
            LEFT JOIN myTable ON ....
            START WITH orgNodeId IN (
                SELECT someColumn FROM anothertable 
                WHERE ...

            )
        CONNECT BY PRIOR .. = ....
        )
        ...

but in posgres it doesn't work and I see error:

ERROR: syntax error at or near "START"
  Position: 282

Looks like my postgres doesn't now such syntax.

Based on https://stackoverflow.com/a/17935842/2674303 I ran:

CREATE EXTENSION tablefunc;

But it disn't help.

What could ve wrong ?

postgres version is 11.6

How to fix it ?

5
  • You can't just take Oracle code and run it in Postgres. You would need to provide sample data, desired results, and you actual query (not just part of it) so one can help rewriting it in Postgres. Commented Jun 16, 2020 at 16:59
  • @ GMB I read stackoverflow.com/a/37846191/2674303 - so not -it doesn't answer Commented Jun 16, 2020 at 17:00
  • @GMB I need unified query which works in both Commented Jun 16, 2020 at 17:31
  • @GMB In the linked post written that connect by could be enabled by executing CREATE EXTENSION tablefunc what did I wrong? Commented Jun 16, 2020 at 17:50
  • Linked post is stackoverflow.com/a/17935842/2674303 Commented Jun 16, 2020 at 17:51

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.