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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems constructing a query

Status
Not open for further replies.

erwin001

IS-IT--Management
Mar 28, 2006
51
US
I have two tables. The 2nd table is a subset of the first table, and I want to query report titles from the 1st table that match report titles from the 2nd table. I want to use something like:

tableone.report title = tabletwo.reporttitle in the criteria of the select query.

Does anyone have any ideas?
 
Something like this (SQL code):
SELECT T1.*
FROM tableone AS T1 INNER JOIN tabletwo AS T2 ON T1.reporttitle = T2.reporttitle

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks! That works. I however would like to match partial titles as well. The way the query is constructed, the report titles have to be an exact match. For example,

services=services
or
services = ser*
should return the same reports

Currently, if services=services isn't an exact match then the desired report doesn't return.

Code:
SELECT T1.*
FROM [Report Function Area] AS T1 INNER JOIN [TBL_CE10Reports] AS T2 ON T1.[Report Name]  Like T2.[Report Name]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top