Query Results???

  • Thread starter Thread starter Harry Moore
  • Start date Start date
H

Harry Moore

Why am I getting different query results from these 2 queries:

Select pname, dservice from visits order by pname; returns 13,749 records.

Select pname, dservice from visits where "t" ="t" order by pname; returns
25,620 records.

The second query returns the correct number of records. The table is a
linked .dbf table.

Harry
 
That is strange. Is it doing something like a Distinct without being asked?
Excluding null values?

Try this:

Select Count(*) from visits ;

and

Select Count(*) from visits where "t" ="t" ;
 
Select Count(*) from visits ; returns incorrect total
Select Count(*) from visits where "t" ="t" ; returns correct total

This is a linked .dbf table. If I import the table the queries return
correct results. Also if I use any valid 'where' clause or 'group by'
clause(other than the first field in the select statement(i.e. pname in this
query) the queries return correct results.

Just goes to show you need to validate your data when dealing with Microsoft
sw.
 
Back
Top