By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,476 Members | 1,497 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,476 IT Pros & Developers. It's quick & easy.

Run my query it prompt which i dont want

P: n/a
When I run my query it prompt to enter ti.Tech is it possble without
asking, it match the ti.tech and corp with FS_TechID and AccountNum.

Thanks.

SELECT ti.CORP, ti.TECH, ti.TECHCONT, ti.tech_id AS Expr1,
tpr1.AccountNum
FROM [select tpr.*, Mid(tpr.AccountNum,1,5) as tprCORP from
tbl_PPVResearch as tpr]. AS tpr1 INNER JOIN tech_id AS ti ON
tpr1.tprCORP = ti.CORP
WHERE (((ti.TECH)=[tpr1].[FS_TechID1] Or (ti.TECH)=[tpr1].[FS_TechID2]
Or (ti.TECH)=[tpr1].[FS_TechID3]));

Sep 5 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Eric wrote:
When I run my query it prompt to enter ti.Tech is it possble without
asking, it match the ti.tech and corp with FS_TechID and AccountNum.

Thanks.

SELECT ti.CORP, ti.TECH, ti.TECHCONT, ti.tech_id AS Expr1,
tpr1.AccountNum
FROM [select tpr.*, Mid(tpr.AccountNum,1,5) as tprCORP from
tbl_PPVResearch as tpr]. AS tpr1 INNER JOIN tech_id AS ti ON
tpr1.tprCORP = ti.CORP
WHERE (((ti.TECH)=[tpr1].[FS_TechID1] Or (ti.TECH)=[tpr1].[FS_TechID2]
Or (ti.TECH)=[tpr1].[FS_TechID3]));
In your case, I'd attempt readability and simplicity by creating another
query.

The new query (Query1) might be something like
select tpr.*, Mid(tpr.AccountNum,1,5) as CORP
from tbl_PPVResearch

Now link Ti to Query1 and link on the CORP fields.

Now use OR statements on TECH to the TECHIDx fields.

It will read better and most likely execute faster.
Sep 5 '06 #2

P: n/a
Eric,
Why are you STILL not listening ??
Please do NOT multipost !!!!

If you *have to* then crosspost.
Multi-posting really is wasting people's time.

Arno R
"Eric" <eh******@gmail.comschreef in bericht news:11**********************@74g2000cwt.googlegro ups.com...
When I run my query it prompt to enter ti.Tech is it possble without
asking, it match the ti.tech and corp with FS_TechID and AccountNum.

Thanks.

SELECT ti.CORP, ti.TECH, ti.TECHCONT, ti.tech_id AS Expr1,
tpr1.AccountNum
FROM [select tpr.*, Mid(tpr.AccountNum,1,5) as tprCORP from
tbl_PPVResearch as tpr]. AS tpr1 INNER JOIN tech_id AS ti ON
tpr1.tprCORP = ti.CORP
WHERE (((ti.TECH)=[tpr1].[FS_TechID1] Or (ti.TECH)=[tpr1].[FS_TechID2]
Or (ti.TECH)=[tpr1].[FS_TechID3]));
Sep 5 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.