Issue 344: Check for empty record fails
Status:  New
Owner: ----
Reported by Doug.Cl...@gmail.com, Oct 23, 2013
What steps will reproduce the problem?
1. This query in pyodbc fails (finds no records)
cursor.execute('SELECT Record, Cue '
               'FROM Songs '
               'WHERE Cue IS NOT NULL '
               "AND Cue <> '' "
               'ORDER BY Record')
2. This query in MS Access works:
SELECT Record, Cue
FROM Songs
WHERE Cue IS NOT NULL
AND Cue <> ''
ORDER BY Record;

3. The Cue field is Long Text, containing XML.

What is the expected output? What do you see instead?

I expect 1849 records. I see 0.

What version of the product are you using? On what operating system?
Python 2.7 pyodbc-3.0.7 on windows 8 64 bit, but using 32 bit python

Feb 4, 2014
#1 Lord.C...@gmail.com
I have encountered the same problem but after some testings, I am not convinced it is pyodbc's fault.

I am running Python 2.7.5 pyodbc-3.0.7 on CentOS 6.4 
and had a query return zero rows when it shouldn't but I also ran the same test with 
Psycopg2 and the same happened after an equal period of runtime (not the cause).

Problem is I'm querying against PostgreSQL-9.2.

I am baffled.