Needs help to build query

Jonny

Registered User.
Local time
Tomorrow, 00:37
Joined
Aug 12, 2005
Messages
144
I have some database with columns 'Number', 'Mfr Name' and 'Mfr Part Number'.
Number - internal catalogue item of a company.
Mfr Name - name of a manufacturer where from we purchase the item
Mfr Part Number - part number of a manufacturer where from we purchase the item
Each item may have one or more Mfr Name & Mfr Part Numbers.
----------------------------------------------------------------------
I need to build a following query:
Input gets part of Mfr Part Number and output is all Mfr Name & Mfr Part Number of match item.
 
do you want to do this from a form? if so use the query design wizard to do this and for the part number criteria put me.formname.controlname
 
I don't want to do it thru form.
I want to do 'Like [Mfr Part Number]' as *<something>* and to get list of all manufacturer part numbers of an item that matches the criteria.
Any idea?
 
ajetrumpet,
This only one step, according to your code I will get only records that match my criteria.
And I want to get "all item" (with all manufacturers) , where one of them match the criteria.

Is it possible?
 
I need to build a following query:
Input gets part of Mfr Part Number and output is all Mfr Name & Mfr Part Number of match item
I guess that was the wrong step then....the way I would answer the question of your above quote is (where the parameter is the item name, or part of the item name)...
Code:
SELECT [mfr name], [mfr part number]
FROM [table]
WHERE [item] LIKE "*" & [parameter] & "*"
If you're trying to enter a part number and get all records from all manufacturers for the item, you can't do it with an input of a part number. You told yourself you couldn't do it....
Each item may have one or more Mfr Name & Mfr Part Numbers.
 
Each item has one or more manufacturers:

Is any way to get all the items with all manufacturers where one of manufacturers fit required expression.

I will try to explain in example:

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

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

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

Thanks
 

Users who are viewing this thread

Back
Top Bottom