query with criteria based on a another table or query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

As a newie I can't seam to work this out.

I have a table containing model numbers.

I have another table that contains a string of varable length that might
contain one of the 100 model numbers.

How do I write the query to show which model is in the string.

How you understand this.

Many thanks in advance

TB
 
Create a query that join the two table, by inner join, joining the two fields
Let say Table1 field = Modal
Table2 Field = BigModal that contain the modal in it together with other data

After you create the query, on the menu bar select view > SQL

And change the SQL from BigModal = Modal
To
BigModal Like "*" & Modal & "*"

SELECT Table1.Modal, Table2.BigModal
FROM Table2 INNER JOIN Table2 ON Table2.BigModal Like "*" & Table1.Modal & "*"

This query will list all the Modal numbers that apears in the BigModal Field
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top