Connecting Tech Pros Worldwide Help | Site Map

Run my query it prompt which i dont want

  #1  
Old September 5th, 2006, 01:05 AM
Eric
Guest
 
Posts: 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]));

  #2  
Old September 5th, 2006, 02:35 AM
salad
Guest
 
Posts: n/a

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.
  #3  
Old September 5th, 2006, 07:45 AM
Arno R
Guest
 
Posts: n/a

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 Threads
Thread Thread Starter Forum Replies Last Post
return Oracle stored function value back to Access VBA colmkav answers 8 July 17th, 2007 12:55 PM
BOF or EOF is true? Christo answers 7 November 15th, 2006 07:35 AM
LOAD .SQL file mr.nitinjain@gmail.com answers 2 November 30th, 2005 08:35 AM
Help with code Mark answers 6 November 13th, 2005 05:00 AM