Skip to Content
0

Create an alias for the @DerivedTable function

Apr 11 at 04:58 PM

15

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

craig buchanan Apr 11 at 05:48 PM
0

One solution:

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

Share
10 |10000 characters needed characters left characters exceeded