Can I Join query like this

E

Eric

I try to join query like this but it gives syntax error on join

SELECT ti.CORP, ti.TECH, ti.TECHCONT, tj.LstVldTech, tpr.Status,
tpr.TicketNum
FROM tbl_validDisputes AS tj, tbl_PPVResearch AS tpr INNER JOIN tech_id
AS ti ON Mid(tpr.AccountNum,1,5) = ti.CORP
WHERE (((ti.TECH)=[tj].[LstVldTech]) AND
((tpr.TicketNum)=[tj].[ticketnum]));

Thanks.
 
D

Douglas J. Steele

I wouldn't advise it.

Use the JOIN (or INNER JOIN) key word for all tables. Something like:

SELECT ti.CORP, ti.TECH, ti.TECHCONT, tj.LstVldTech, tpr.Status,
tpr.TicketNum
FROM tbl_validDisputes AS tj INNER JOIN (tbl_PPVResearch AS tpr INNER JOIN
tech_id
AS ti ON Mid(tpr.AccountNum,1,5) = ti.CORP) ON
tpr.TicketNum)=[tj].[ticketnum])
WHERE (((ti.TECH)=[tj].[LstVldTech])
 

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