Getting Number of Records That Fit Criteria

Jonny

Registered User.
Local time
Today, 19:47
Joined
Aug 12, 2005
Messages
144
I'm traying to build a query that doing following:

I have a table with two columns:

items | manufacturers
------------------------------
ABC1 | golf
ABC1 | toyota
ABC1 | citroen
ABC2 | skoda
ABC2 | subaru
ABC3 | peugeot
ABC3 | renault
ABC3 | dodge

The access ask me for "Manufacturer", when I give part of it , I'm getting all items, where one of manufacturers that I asked.

Example for Input: *olf*
Output:
ABC1 | golf
ABC1 | toyota
ABC1 | citroen

Example for Input: *aru*
Output:
ABC2 | skoda
ABC2 | subaru

Example for Input: *aul*
Output:
ABC3 | peugeot
ABC3 | renault
ABC3 | dodge

Please help
Thanks
 
It solved

It solved!

SELECT s.Items,
s.Manufacturers
FROM Table1 AS s
INNER JOIN (
SELECT Items
FROM Table1
WHERE Manufacturers LIKE [Manufacturer?]
GROUP BY Items
) AS r ON r.Items = s.Items

Thanks to everybody!
 

Users who are viewing this thread

Back
Top Bottom