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

Parser error in subselect [CORE3563] #3918

Closed
firebird-automations opened this issue Jul 28, 2011 · 4 comments
Closed

Parser error in subselect [CORE3563] #3918

firebird-automations opened this issue Jul 28, 2011 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Harald Klomann (harrykl)

CREATE TABLE A (NR INTEGER, S CHAR(1), X INTEGER);
CREATE TABLE B (NR INTEGER);

These statements should result in an error, because column X is not member of table B

select * from a where nr in (select x from b);

select * from a where exists (select x from b);

@firebird-automations
Copy link
Collaborator Author

Modified by: Harald Klomann (harrykl)

description: CREATE TABLE A (NR INTEGER, S CHAR(1), X INTEGER);
CREATE TABLE B (NR INTEGER);

These statements should result in an error, because column NR is not member of table B

select * from a where nr in (select x from b);

select * from a where exists (select x from b);

=>

CREATE TABLE A (NR INTEGER, S CHAR(1), X INTEGER);
CREATE TABLE B (NR INTEGER);

These statements should result in an error, because column X is not member of table B

select * from a where nr in (select x from b);

select * from a where exists (select x from b);

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

You're wrong. Sub-selects can reference fields from outer contexts, so X is resolved as A.X.

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

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

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

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

No branches or pull requests

1 participant