SELECT ALL still returns only unique records

  • Thread starter Thread starter Herbert Chan
  • Start date Start date
H

Herbert Chan

Hello,

I want to get all the individual records and I've read the help file. It
says that the SELECT command defaults to ALL. However, even if I've used
SELECT ALL to get the data, the result just contains unique records. I must
then also include a unique transaction record number to retrieve all the
records that fit my criteria. Why?

Another question: will the inclusion of unnecessary fields to be retrieved
slowed down the query process?

Hope someone can help me.

Thanks

Herbert
 
Post your SQL.
If the unnecessary fields are large, then theoretically, there may be a
performance drop. Your results may vary, so testing is the only way to be
sure.

--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
My SQL is

SELECT cont_no, source FROM tuen0103 WHERE cont_no='Nil'

This returns only distinct records. I have to use this

SELECT transac_no, cont_no, source FROM tuen0103 WHERE cont_no='Nil'

to return all matching records, and I actually don't need the information
stored under transac_no.

Anyone has any idea??

Herbert
 
Is that the SQL statement copied and pasted from the SQL window? And if so,
what program are you using to generate the SQL? Access would definitely NOT
give that as its SQL statement. It would have many more brackets and
parentheses in the SQL statement.

Also, what is tuen0103? Is it an Access Table, an Access query, or is it a link
to a table in another database or an Excel file?
 
Looks strange to me. The columns listed in the SELECT clause shouldn't
affect the number of rows returned. Perhaps you could post your
table's schema and some sample data that demonstrates the behaviour
you are experiencing.
 
Are you serious? Are you aware that you are allowed to type in the SQL
window, you don't have to use that query builder tool thing to
generate SQL. And if you do use it, surely you realize that most of
the brackets and parentheses that MS Access inserts have no function,
right? Of course you know all this, you're a MVP!
 
Yes, I do realize that most of the parentheses and brackets that the query
builder inserts are not necessary. And I often build my queries with the query
builder and then adjust them in the SQL window. I am lazy and find that I don't
need to worry about correctly typing field names and table names.

The reason for my question was to see if the poster was using the Query builder
but had just typed the query directly into the mail message. I've seen examples
(many times) where the poster will enter what they think is in the query. It
then turns out there is additional material in the actual SQL (such as a
Distinct clause.
 
Back
Top