like criteria

G

Guest

I have two tables
tableA and tableB both have upc data in them however tableB has a "00" in
front of the upc code

I need to see all of tableA and what tableA.upc is like in tableB.upc
when I open up tableB and search tableB.upc in the upc field even though my
I am searching the exact same text as the field, I still have to chose "any
part of field" for the search to find something.

oh and tableB is a linked table via odbc from a sql server
thanks,
Scott
 
M

[MVP] S.Clark

Select A.*, B.* from A, B
WHERE A.Fieldname = "00" & B.Fieldname

Since the "00" is fixed, there is no need to use LIKE. But since you don't
have a direct match, you can not use an INNER Join. Thus, using criteria to
perform the link should get you there.
 
J

John Spencer (MVP)

Perhaps the following would work

SELECT TableA.*, TableB.*
FROM TableA INNER JOIN TableB
ON TableA.UPSField = "00" & TableB.UPSField

That will be slow, since no indexes will be involved in the join.
 

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

Similar Threads

Like and extra 000's 2
delete Using Join Statement 4
Query Joins 2
updating table based on another table 2
Is there a join that does this? 2
select Statement w/i inner joins 4
Deleted Records? 2
Not It Query 2

Top