FirebirdSQL / firebird-documentation

Firebird documentation
https://www.firebirdsql.org/en/firebird-rdbms/
34 stars 14 forks source link

Sql query behavior not as expected [DOC142] #145

Closed firebird-automations closed 3 years ago

firebird-automations commented 5 years ago

Submitted by: Paweł Krzyżanowski (zpksoft)

in https://firebirdsql.org/manual/nullguide-predicates.html

is code:

SELECT Farmer FROM Farms WHERE EXISTS
  (SELECT * FROM Landowners
   WHERE Landowners.Name = Farms.Farmer)

but not working:

SELECT Farmer FROM Farms WHERE EXISTS
  (SELECT * FROM Landowners
   WHERE Landowners.Name CONTAINING Farms.Farmer)

(and not working with like, result is NULL)

For example 'LISA' as Farmer and 'MONALISA' as Landowners.Name 'MONALISA' CONTAINING 'LISA' but EXISTS in this query returns NULL. Alone EXISTS returns correct dataset.

mrotteveel commented 3 years ago

Without more details, this is not really answerable. It also looks like a support question which would be more suitable for https://groups.google.com/g/firebird-support