Connection should only show fields containing data

doromi 03 May, 2011

I have written several forms and connections till today and I'm very pleased about their features.
For the first time I'm trying the WHERE clause in the connection. I only want to show records that contain data, but I don't get the right syntax for the where clause. Have been wading through lots of threads, but I didn't find the right clue... 😶

When I enter
WHERE 'field1' IS NOT NULL OR 'field1' != '' OR 'field2' IS NOT NULL OR 'field2' != ''
I still get all records from the according table even if the fields ARE empty...

How should the WHERE clause look instead ?

Thanks in advance,

GreyHead 04 May, 2011
Hi Doris,

I think that the logic is OK but the quotes are wrong. Column names need to be in backticks `` not straight quotes.
WHERE `field1` IS NOT NULL OR `field1` != '' OR `field2` IS NOT NULL OR `field2` != ''

This topic is locked and no more replies can be posted.