queries return too much

  • Thread starter Thread starter joe
  • Start date Start date
J

joe

when running my query i have a small problem. i am runnin
access xp and running it on a windows xp pro system.

when i get the results of my query i get the same item
about 7 or eight times then it continues on. for example

my table is
tool_primeinfo

which has partnumber,serialnumber,location

my sql statement is
SELECT tool_primeinfo.toolpn, tool_primeinfo.toolsn,
tool_primeinfo.toollocation,
FROM tool_primeinfo
WHERE (((tool_primeinfo.toolpn) Like "*" & [What Part
Number are you looking for?] & "*"))
ORDER BY tool_primeinfo.toolpn;

when i run this i get multiple returns for the same
partnumber and my total records come out to a crazy amout
like 100,000 when i only have 8000 at the most.

if i did not explain this correctly tell me what elsy you
need and i will get it too you but i am at a loss and dont
know what to do.
 
Try
SELECT DISTINCT etc
This will ensure that you will only row returned for any
combination of part number, serial number and location. If
you want only part numbers returned, remove the serial
number and location from the SELECT statement.

Hope This Helps
Gerald Stanley MCSD
 
Back
Top