Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aliases and error about cyclic dependencies in CTE [CORE2502] #2914

Closed
firebird-automations opened this issue Jun 10, 2009 · 9 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @tonal

Votes: 1

Simple queru with CTE work
{code:sql}
with
CHARGES (ID) as (select ID from CHARGES CR where PERIOD = '2009')
select ID from CHARGES CR
{code}

But if remove aliase in last {bold}select{bold} recive error
{code:sql}
with
CHARGES (ID) as (select ID from CHARGES CR where PERIOD = '2009')
select ID from CHARGES
{code}

{quote}
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
CTE 'CHARGES' has cyclic dependencies.
{quote}

====== Test Details ======

See test for CORE5667

@firebird-automations
Copy link
Collaborator Author

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @tonal

Exampls with only system table.

Work query:
{code:sql}
with
RDB$DATABASE (ID) as (select RDB$RELATION_ID from RDB$DATABASE)
select ID from RDB$DATABASE R
{code}

Error query:
{code:sql}
with
RDB$DATABASE (ID) as (select RDB$RELATION_ID from RDB$DATABASE)
select ID from RDB$DATABASE R
{code}

{quote}
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
CTE 'RDB$DATABASE' has cyclic dependencies.
{quote}

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Already fixed

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

status: In Progress [ 3 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5.8 [ 10809 ]

Fix Version: 3.0.3 [ 10810 ]

Fix Version: 4.0 Beta 1 [ 10750 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Covered by another test(s)

Test Details: See test for CORE5667

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

summary: Aliase in CTE => Aliases and error about cyclic dependencies in CTE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment