Skip to content

Error 1801 #28

Open
Open

Description

@lscheffler

Additional to what is stated the error will be called if a sub-select wrongly references upper select without using the inner one.
This fails:

SELECT Cur1.*;
 FROM myTable AS Cur1;
 WHERE Cur1.PIx NOT IN (;
   SELECT;
    Cur2.PIx;
    FROM myTable AS Cur2;
    WHERE Cur1.iTyp=1)

This runs

SELECT Cur1.*;
 FROM myTable AS Cur1;
 WHERE Cur1.PIx NOT IN (;
   SELECT;
    Cur2.PIx;
    FROM myTable AS Cur2;
    WHERE Cur1.iTyp=Cur2.iTyp)

Note the use of Cur1.iTyp in the sub-select

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions