Forum Discussion
MS Access SQL - No Current Record Error
Hi
I am getting this error when I run a query below query:
SELECT *,
(SELECT STDEV(LOG_PRICE_CHANGE)
FROM QRY_LOG_PRICE_CHANGES AS T1
WHERE T1.UNDERLYING_SYMBOL = QRY_LOG_PRICE_CHANGES.UNDERLYING_SYMBOL AND
QRY_LOG_PRICE_CHANGES.ROW_NUMBER-T1.ROW_NUMBER BETWEEN 0 AND 20) AS STD_DEV
FROM QRY_LOG_PRICE_CHANGES
Here are the steps I have taken so far in troubleshooting this issue:
1. I ran QRY_LOG_PRICE_CHANGES and it ran with no issues. This means this query is correct. The query is slow though. Could that be an issue? Does Access have a timeout feature that I am not aware of? It probably takes 2 minutes max to run.
2. If I change QRY_LOG_PRICE_CHANGES to TBL_LOG_PRICE_CHANGES then noted query runs without any issues. This means that the noted query will process the data that is found in QRY_LOG_PRICE_CHANGES so there are no data issues or incompatible header issues.
3. The test database is about 1.6 GB. Access has a 2 GB limit (i think). I created a new temp DB and had a linked table created that displayed the raw data from the test database in the temp database I created. I then copied the two queries (QRY_LOG_PRICE_CHANGES and above noted query) into the temp DB. I still get the same error message.
4. I have checked online for this error and it makes references to SYSDATA folder. I checked my computer and I don't even have this folder. Here is the Microsoft literature:
Not sure if this is related or not. Obviously, Microsoft says it is so it probably is. I just don't understand why only this query is giving me a hard time. I have multiple queries that are running off the same main table etc and no issues with those. It is just this one query that is giving me a problem.
5. Not sure if this is related or not. I always use alias of the form TX where X = 1,2,3, etc. I was not able to create the second alias so it is left as is.
6. Running a simple query works:
SELECT *
FROM qry_Log_Price_Changes;
I am really stumped here. Not sure what else to do.
Does anyone know what is going on here?
- manny213Copper Contributor
Does the subquery work as a standalone query?
You can find various timeout settings in Access options.. Client Settings....Advanced
- manny213Copper ContributorThanks for the reply.
Yes the base query QRY_LOG_PRICE_CHANGES runs fine on its own.
I took a look at the Client Settings...Advanced options. There are 5 settings. Which one would you suggest I look at?
- manny213Copper Contributor
is anyone able to help me with this?