Database Search with string portion

G

Guest

IN MS Access Query Design Mode

We have 2 tables

Table-1 Supplier Table with Full Address – Mutlifields (Name, Address,
email etc)
Table-2 Short Title Supplier –Single field

Example1) Sony International, Sony Local, Global Sony, J-Sony-Singapore as
supplier name in Table A
2) Pepsi Holdings, Pepisico, Singapore Pepsi as supplier name in Table 2

These 2 companies have short names as Sony, Pepsi in Table 2.

Using MS Access Query in Design Mode , how do I link these 2 tables and
extract data from Table-1 for Sony, Pepsi

My search normally at a time is to look for data in Table-1 for 50 Short
name suppliers.

Any help will ge greatly appreciated.
 
G

Guest

Have you setup a relationship between the two tables? One way of doing this
is to create a lookup field in Table1 that stores the value from Table2. You
use the Lookup Wizard when setting the DataType of lookup field in Table1.

Once the relationship is setup then when you pull the two tables into the
Query Design view you will see a line joining the two tables and your
relationship is set and your query should work.
 
J

John Spencer

SELECT *
FROM SupplierTable INNER JOIN ShortTitles
ON SupplierTable.Name LIKE "*" & ShortTitles.Name & "*"

Or just add the two tables to the query grid with no join and under the Name
field set the criteria to something like the following:


Field: Name
Table: SupplierTable
Criteria: LIKE "*" & [ShortTitles].[Name] & "*"
 
G

Guest

Superb

Mank Many Thanks.

John Spencer said:
SELECT *
FROM SupplierTable INNER JOIN ShortTitles
ON SupplierTable.Name LIKE "*" & ShortTitles.Name & "*"

Or just add the two tables to the query grid with no join and under the Name
field set the criteria to something like the following:


Field: Name
Table: SupplierTable
Criteria: LIKE "*" & [ShortTitles].[Name] & "*"


IN MS Access Query Design Mode

We have 2 tables

Table-1 Supplier Table with Full Address – Mutlifields (Name, Address,
email etc)
Table-2 Short Title Supplier –Single field

Example1) Sony International, Sony Local, Global Sony, J-Sony-Singapore as
supplier name in Table A
2) Pepsi Holdings, Pepisico, Singapore Pepsi as supplier name in Table 2

These 2 companies have short names as Sony, Pepsi in Table 2.

Using MS Access Query in Design Mode , how do I link these 2 tables and
extract data from Table-1 for Sony, Pepsi

My search normally at a time is to look for data in Table-1 for 50 Short
name suppliers.

Any help will ge greatly appreciated.
 

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

Top