[freetds] select bug...

Spyros Ioakim sioakim at atlas.ace-hellas.gr
Tue May 6 07:04:09 EDT 2003


I have the following two queries:

SELECT Company.CompId FROM COMPANY, INSTALLS WHERE Company.CompId = 186
and (NoDownloads is null OR NoDownloads=0) AND Installs.CompID =
Company.CompID AND Installs.ProdId IN (SELECT ProdId FROM Products WHERE
Products.Code LIKE 'N%3%') AND ( (Installs.InstDate >= '11/06/02') OR
(Installs.CompId IN (SELECT Installs.CompId FROM Installs, Products
WHERE Installs.ProdId = Products.ProdId AND ( (Products.Code LIKE
'N%3%') ) AND Installs.InstlId IN (SELECT InstlId FROM Cntrcts WHERE
CntrctType LIKE 'πΣ%' AND ToDate >= '05/06/03') ) ) )


SELECT Company.CompId FROM COMPANY, INSTALLS WHERE Company.CompId = 258
and (NoDownloads is null OR NoDownloads=0) AND Installs.CompID =
Company.CompID AND Installs.ProdId IN (SELECT ProdId FROM Products WHERE
Products.Code LIKE 'N%3%') AND ( (Installs.InstDate >= '11/06/02') OR
(Installs.CompId IN (SELECT Installs.CompId FROM Installs, Products
WHERE Installs.ProdId = Products.ProdId AND ( (Products.Code LIKE
'N%3%') ) AND Installs.InstlId IN (SELECT InstlId FROM Cntrcts WHERE
CntrctType LIKE 'πΣ%' AND ToDate >= '05/06/03') ) ) )

SQL Server reports 2 results for the first and 1 result for the seconds
query.
FreeTDS reports 1 result for the first and 0 results for the second
query.
Yes the select has a couple of greek characters in CntrctType.

Any ideas on how to trace the problem (as you can see the only
difference is the CompId value).
How can I use this outside of php and post you a log of the two queries?

Thanks,
Spyros





More information about the FreeTDS mailing list