WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ODBC
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

ODBC WHERE Syntax Blank Data


Question:

I am using the ODBC Extender with the dBase 5.0 ODBC driver and need to use something like the following:
WHERE (address1 = '' OR city = '' OR state = '' OR zip = '')
Apparently, the syntax is correct, because the qExecDirect statement returns @qSuccess. However, its not returning any results (which I know there are). If I do a bunch of IF statements (simulating the above WHERE line) it works. I was wondering if perhaps the = '' was incorrect.

Answer:

I am not sure that is valid SQl statment. You are really trying to search for NULL data. Try using IS NULL instead of = ''.

User Reply:

Looks like "is NULL" works, thanks
Article ID:   W16837
File Created: 2017:07:28:13:58:32
Last Updated: 2007:07:03:14:26:29