methew / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

sql query malfunction #332

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.cur.execute(..)
2.
3.

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

"""SELECT UAVT_BINA.BINATUR, YAPI.TIP, YAPI.ID, YAPI.KIMLIKNO, YAPI.AD
FROM UAVT_BINA INNER JOIN YAPI ON UAVT_BINA.BINANO = YAPI.KIMLIKNO
WHERE (((UAVT_BINA.BINATUR)='OZEL ISYERI') AND ((YAPI.TIP)<>3));"""

Expected query results is selected 71 records. When i run this query on Access 
database result is 71 records. But when i run this query on python, query 
results is 593 records. I used alternatively the following query but results 
didn't change.

"""SELECT YAPI.ID, YAPI.KIMLIKNO, YAPI.TIP
FROM YAPI WHERE NOT EXISTS (SELECT UAVT_BINA.BINANO FROM UAVT_BINA WHERE 
UAVT_BINA.BINANO=YAPI.KIMLIKNO AND UAVT_BINA.BINATUR <>'OZEL ISYERI' AND 
YAPI.TIP=3)"""

What version of the product are you using? On what operating system?

python 2.7, pyodbc 3.0.6, Windows 7, Office 2007 

Please provide any additional information below.

I get this error when working with two different table.  Please help me?

Original issue reported on code.google.com by kamilcak...@gmail.com on 29 Jul 2013 at 3:07

Attachments: