Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SPT Syntax help
Message
 
 
To
25/08/2010 07:07:19
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01478231
Message ID:
01478310
Views:
34
>This part bogs down our entire system. Somehow if needs to limit to matching Table a part no only instead of looking at 200,000 from Table b at every iteration of Table a.
>
>
>
>(select PartNo, max(date) as MaxDate from TableB group by PartNo)
>
>
Is this particular query too expensive?

Try another variation then
select A.*, B.RevisionLevel, B.Date from
TableA A inner join (select top 1 PartNo, Date, RevisionLevel from TableB order by Date DESC) B
 on A.PartNo = B.PartNo
where A.RevisionLevel <> B.RevisionLevel
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform