Board index » delphi » Problem with SQL in TQuery.Help...

Problem with SQL in TQuery.Help...

I had a problem with TQuery:
The SQL result of a tQuery changes when I change the order of
lines in the SQL property :
 1)Select * from "cards.dbf"
    where (color in (1,3,4)) and (extension in (2,5))
and
 2)Select * from "cards.dbf"
    where (extension in (2,5)) and (color in (1,3,4))
1) and 2) don't give the same result.
the other Borland's software given with Delphi 1.0 give for 1)
and 2) the same (and right) result.

Does someone understand that?

Thenks

 

Re:Problem with SQL in TQuery.Help...


[snip]

I may a solution for you... it's not scientific but it may work.
try this: Select * from "cards.dbf"
           where 1=1 and ... the rest of your statement.

I had some similar problems with the select statement. I posted a msg
on this news group "Possible SQL Select glitch", and if I get no reply
before the end of the week, i'll place a call at borland tech. support.

please advise of your results!

Regards /Bernard

Other Threads