I'm having trouble running update and delete external sql queries. When I try to run them, I get a "cannot find action query" error. Anyone know how to fix this?
I've never seen this error before.
Can you provide more information:
1) the kind of database you are accessing,
2) the complete error message,
3) the error number,
4) and, the method by which you are running the query?
5) if you are running this in VBA code, also the relevant code.
1) I was using another spreadsheet to learn about queries
2) cannot find action query
3) no error number
4) After creating a connection, I went to the edit query section
5) N/A
Interesting. Got me - when you say you created a connection, how did you create the connection? How is the data structured on the other sheet (is it a named range, or an actual Excel Table)? Can you successfully run SELECT queries on the data source (this can help narrow down the problem if we know that Select queries work but Update queries don't)? What version of Excel are you using?
1) I goto import data (I don't want to import it as a spreadsheet)
2) It uses the top row as the header, which is Test in this case
3) Select queries are no problem
4) excel 2003... My work is cheap.
UPDATE `C:\Documents and Settings\<user>\Desktop\Book1.xls`.`Sheet1$` `Sheet1$`
SET `Sheet1$`.Test='b'
WHERE (`Sheet1$`.Test='a')
I personally don't have much patience with MSQuery - you have to learn it's quirks. You could do worse than read Zapawa's book on "Advanced Excel Reporting" - I did once but now I stick to ADO most all the time.
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.