Connecting Tech Pros Worldwide Forums | Help | Site Map

Run my query it prompt which i dont want

Eric
Guest
 
Posts: n/a
#1: Sep 5 '06
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]));


salad
Guest
 
Posts: n/a
#2: Sep 5 '06

re: Run my query it prompt which i dont want


Eric wrote:
Quote:
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.
Arno R
Guest
 
Posts: n/a
#3: Sep 5 '06

re: Run my query it prompt which i dont want


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" <ehtisham@gmail.comschreef in bericht news:1157415565.327353.313620@74g2000cwt.googlegro ups.com...
Quote:
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]));
>
Closed Thread


Similar Microsoft Access / VBA bytes