Insert query based on subquery takes forever, opens copies of db in Task Manager

  • Thread starter ragtopcaddy via AccessMonster.com
  • Start date
R

ragtopcaddy via AccessMonster.com

I have the following subquery:

SELECT [Store #] FROM qryStoreMaster WHERE [Market#]=12060 AND [Brand]="ATS"
AND [Sales]*0.000001>=1

...which runs instantly.

I use it in the following update query:

UPDATE tblStoreChkLst SET Include = True
WHERE [Store #] In (SELECT [Store #] FROM qryStoreMaster WHERE [Market#]
=12060 AND [Brand]="ATS" AND [Sales]*0.000001>=1)

...which takes several minutes to run and when I go to shut it down in Task
Manager (it will not break with Ctrl+Break) I notice there is one instance of
"StoreMaster: Database...", 2 instances of "Microsoft Access - [Query1:Update
Query]", and 2 instances of "Microsoft VIsual Basic - StoreMaster [break]..."

I can't figure out why it takes so long to run this update query. It used to
run instantly.

Thanks,

BIll
 
R

ragtopcaddy via AccessMonster.com

If I use the following query:

UPDATE tblStoreChkLst INNER JOIN qryStoreMaster ON tblStoreChkLst.[Store #] =
qryStoreMaster.[Store #] SET Include = True
WHERE [Market#]=12060 AND [Brand]="ATS" AND [Sales]*0.000001>=1

I get the error msg:

3073 - Object must use an updateable query


I have the following subquery:

SELECT [Store #] FROM qryStoreMaster WHERE [Market#]=12060 AND [Brand]="ATS"
AND [Sales]*0.000001>=1

...which runs instantly.

I use it in the following update query:

UPDATE tblStoreChkLst SET Include = True
WHERE [Store #] In (SELECT [Store #] FROM qryStoreMaster WHERE [Market#]
=12060 AND [Brand]="ATS" AND [Sales]*0.000001>=1)

...which takes several minutes to run and when I go to shut it down in Task
Manager (it will not break with Ctrl+Break) I notice there is one instance of
"StoreMaster: Database...", 2 instances of "Microsoft Access - [Query1:Update
Query]", and 2 instances of "Microsoft VIsual Basic - StoreMaster [break]..."

I can't figure out why it takes so long to run this update query. It used to
run instantly.

Thanks,

BIll
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top