Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Distinct query is returning weird result 1

Status
Not open for further replies.

VijiKumara

Programmer
Mar 13, 2018
17
0
0
US
Hi,

I imported a data which is in Microsoft Excel and were able to import successfully. I did this by using export/import wizard. All the data types I assigned are varchar with enough space. But when I query the table for distinct records(both count and number of records), it always returns only one count and the record. This sounds very weird to me because the table has many distinct records. Please help.

1) The below image indicates table has many records.
Table_recordsJPG_v3vm7l.jpg


2) The below image shows, query returning only one record as distinct
Distinct_Users_bzx5ps.jpg


3) The below image shows, query returning, 1 as distinct count
Distinct_Users_Count_srlma3.jpg


Thanks in advance,
VIJ
 
I believe the issue is with naming a column "User". Can you rename the column or try wrapping it in []s.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
You are absolutely right! I renamed the columns & it started working. Thank you very much for the great tip!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top