Board index » off-topic » paradox can not run complex local sql?

paradox can not run complex local sql?


2003-07-17 01:37:33 PM
off-topic9
I have a paradox7 table like this :
FirstKey char(8)
F001 char(4)
F002 char(11)
..//about ten fields here , all simple type(char or numeric)
and about 1,700 record in it.
when i run " select * from Table1" , it is OK
when i run " select * from Table1 order by FirstKey", it is wrong! all the record showed is the same one!!! the first record!
and i delete 1,000 record , then run it , it is OK.
I then add some condition
"select * from Table1
where Firstkey like '%DT' or Firstkey like '%ST'
order by FirstKey "
it run WRONG AGIN!!!
But When I remove the "order by FirstKey" , all the sql is OK.
althouth i add the recordcount up to 2000.
 
 

Re:paradox can not run complex local sql?

I have a paradox7 table like this :
FirstKey char(8)
F001 char(4)
F002 char(11)
..//about ten fields here , all simple type(char or numeric)
and about 1,700 record in it.
when i run " select * from Table1" , it is OK
when i run " select * from Table1 order by FirstKey", it is wrong! all the record showed is the same one!!! the first record!
and i delete 1,000 record , then run it , it is OK.
I then add some condition
"select * from Table1
where Firstkey like '%DT' or Firstkey like '%ST'
order by FirstKey "
it run WRONG AGIN!!!
But When I remove the "order by FirstKey" , all the sql is OK.
althouth i add the recordcount up to 2000.
 

Re:paradox can not run complex local sql?

Where and how are you looking to the query results ?
Maybe I'm stupid, but are you iterating thru the query results by using a
block of code similar to:
with query1 do
begin
First;
while not Eof do
begin
{some statements}
end;
end;
maybe you forgot to use Next in the "while" block. I'm doing this sometimes
when I'm tired !
You see only the first record 2000 times or the query result consists of one
record ?
Is FirstKey the primary key of the table ?
Blackie
"hydonlee" < XXXX@XXXXX.COM >wrote in message
Quote

I have a paradox7 table like this :
FirstKey char(8)
F001 char(4)
F002 char(11)
..//about ten fields here , all simple type(char or numeric)

and about 1,700 record in it.

when i run " select * from Table1" , it is OK
when i run " select * from Table1 order by FirstKey", it is wrong! all the
record showed is the same one!!! the first record!
and i delete 1,000 record , then run it , it is OK.

I then add some condition
"select * from Table1
where Firstkey like '%DT' or Firstkey like '%ST'
order by FirstKey "
it run WRONG AGIN!!!

But When I remove the "order by FirstKey" , all the sql is OK.
althouth i add the recordcount up to 2000.

---
From me: This outgoing mail is certified virus-free by AVG.
Checked by AVG anti-virus system (www.grisoft.com).
Version: 6.0.501 / Virus Database: 299 - Release Date: 14.07.2003
 

{smallsort}

Re:paradox can not run complex local sql?

thanks for your reply.
I run my sql in SQL Explorer. Get the same result whit in my project.
"Blackie" < XXXX@XXXXX.COM >wrote:
Quote
Where and how are you looking to the query results ?

Maybe I'm stupid, but are you iterating thru the query results by using a
block of code similar to:
with query1 do
begin
First;
while not Eof do
begin
{some statements}
end;
end;
maybe you forgot to use Next in the "while" block. I'm doing this sometimes
when I'm tired !

You see only the first record 2000 times or the query result consists of one
record ?
Is FirstKey the primary key of the table ?

Blackie

 

Re:paradox can not run complex local sql?

Please try to avoid multi-posting.
--
Regards, JohnH (TeamB)
Quality Central, bug status & reporting qc.borland.com/
Code Central codecentral.borland.com/codecentral/ccweb.exe
QC discussion is in newsgroup "borland.public.bdn.qualitycentral".
Newsgroup list & guidelines info.borland.com/newsgroups/