ORA-00936: missing expression on 9.6.630 in Subselect
Posted: Fri 16 Nov 2018 08:42
Hi,
the ef core linq expression
results to the generated sql
which throws the error "ORA-00936: missing expression". There are brackets missing around the subselect.
SQL
WHERE "three"."Id" NOT IN SELECT ... FROM ... WHERE ...
should be
WHERE "three"."Id" NOT IN (SELECT ... FROM ... WHERE ...)
Democode can be downloaded here
the ef core linq expression
Code: Select all
dbContext.Class1.Where(three =>
!dbContext.Class1
.Where(o => o.Test || o.Value < 5)
.Select(o => o.ParentId)
.Contains(three.Id)
)
Code: Select all
SELECT "three"."Id", "three"."ParentId", "three"."Test", "three"."Value"
FROM "Class1" "three"
WHERE "three"."Id" NOT IN SELECT "o"."ParentId"
FROM "Class1" "o"
WHERE ("o"."Test" = 1) OR ("o"."Value" < 5)
SQL
WHERE "three"."Id" NOT IN SELECT ... FROM ... WHERE ...
should be
WHERE "three"."Id" NOT IN (SELECT ... FROM ... WHERE ...)
Democode can be downloaded here