Libreoffice Base "Not Like" command problem in Query


I am using Windows 10 x64, LibreOffice version Version:

So in my database, I have a certain field that I wanted to filter out. I was doing this in the Query mode. I said I wanted to exclude (or filter I guess I should say) some remark in a field that mentioned ‘APPLES’ (nothing else - just the word Apples) only but display everything else other than ‘APPLES’, so I said NOT LIKE ‘APPLES’. Unfortunately, I found out that when I did this, by default it considered the field that had NO DATA as a field that had ‘APPLES’ for some weird reason, which totally removed them too. It wasn’t until I went in the table and just hit space in each one of those empty fields that I was able to display this correctly.

Is this a bug in the program or is this the way it is suppose to work?

<> ‘Apples’


A field having ‘NO DATA’ is a NULL field. NULL is nothing. When used in a comparison it will never equal a value nor be unequal to a value. It is NOTHING. Therefore, in your situation, you must also check for this NULL situation.

So for your SQL:

Select * From MyTable Where MyField NOT LIKE 'Apples' OR MyField IS NULL