Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help for newbie please 1

Status
Not open for further replies.

SomersetBoy

Technical User
May 11, 2010
1
GB
Hello
I am trying to write a simple sql query but cannot get it to work.
I have two tables-
Table 1 Table 2
ObjectID ObjectID
Type Name
Data

The result of the query should contain Table1.Data and Table2.Name
WHERE Table1.Type=Defect and the 2 objectID are the same

TIA

Graham
 
SELECT Table1.Data, Table2.Name
FROM Table1 INNER JOIN Table2 ON Table1.ObjectID = Table2.ObjectID
WHERE Table1.Type = 'Defect'

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top