Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to select the top 10 non-matching records using SQL

Status
Not open for further replies.

3pmilk

MIS
Jun 20, 2002
46
US
Hi all,

I'm creating a VBA/ACCESS app that contains two listview boxes: listview box A and ListView B. Each Listview box contains a list of project IDs. The user has the option of choosing a project from each listview box and compare their results. I have written a query to retrieve data from the tables IF the user were to select the "correct projects" to do the comparison to begin with, but if they were to select the wrong projects (project ids) and do the comparison, then the query runs forever....and ultimately it just hangs. So, this leads me to create another query that says if the first 10 records between these two selected project don't match (via their control account ids, and etc), then pop a message box up saying, " wrong projects." How do I go about and do that?


I know you can select top N select list from table name, not sure how to incorporate that into my program...

Thanks for all your help
 
you'll have a better chance of getting an answer in either the VB or Access forums

this forum is for ANSI SQL

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top