LOOK UP in query

User avatar
sal21
PlatinumLounger
Posts: 4423
Joined: 26 Apr 2010, 17:36

LOOK UP in query

Post by sal21 »

First query of this type :sad: :scratch:

Have table1 with
filed1
3500
4500
1458
...

and tabl2 with
filed2 field3
3500 description of 3500
4500 description of 4500
1458 description of 1458
...

i need a query to get value of filed3 from value filed1 and return the recordset similar 3500-description of 3500....

peraph with join statement?

note:
the tables are into the same db

User avatar
HansV
Administrator
Posts: 78870
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: LOOK UP in query

Post by HansV »

Create a query like this:

SELECT table1.filed1, tabl2.filed3 FROM table1 LEFT JOIN tabl2 ON table1.filed1 = tabl2.filed2
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4423
Joined: 26 Apr 2010, 17:36

Re: LOOK UP in query

Post by sal21 »

HansV wrote:Create a query like this:

SELECT table1.filed1, tabl2.filed3 FROM table1 LEFT JOIN tabl2 ON table1.filed1 = tabl2.filed2
no WORDS!
:clapping: :clapping: :thankyou: