Skip to Content

Create an alias for the @DerivedTable function

Is it possible to create an alias for the @DerivedTable function when it is being referenced in another derived table?

DT_FOO:

SELECT  *
FROM    schema.table_foo

DT_BAR:

SELECT  foo.*
FROM    @DerivedTable(DT_FOO) AS foo

Generates a missing right parentheses error when used in Oracle.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 11 at 05:48 PM

    One solution:

    SELECT  foo.*
    FROM  ( SELECT * FROM @DerivedTable(DT_FOO) ) AS foo

    Add comment
    10|10000 characters needed characters exceeded