FoolzRailer
New member
- Local time
- Today, 07:29
- Joined
- Apr 15, 2016
- Messages
- 25
I'm trying to update a tables in access database column based on a query that I've shown below. I keep getting an error saying "Operation must use an updatable query." I have one standard select query before the one shown below, which I believe is the culprit. The subquery that counts and gives a sequence based on each LedningID and Length, is based on what I can read the issue. Is my assumption correct? And how can I fix this, can I do a separate query and remove the subquery in order for the updatequery to work?
Example of sequenced data output:
Code:
SELECT KoordinaterStik.OpstrømsHovedKnude, KoordinaterStik.OpstrømsHX, KoordinaterStik.OpstrømsHY, KoordinaterStik.NedstrømsHovedKnude, KoordinaterStik.NedstrømsHX, KoordinaterStik.NedstrømsHY, KoordinaterStik.LedningID, KoordinaterStik.StikX, KoordinaterStik.StikY, KoordinaterStik.KnudeID, KoordinaterStik.LængdeFraOpstrøms, KoordinaterStik.Knudenavn,
(SELECT COUNT(*)
FROM KoordinaterStik AS t2
WHERE t2.LængdeFraOpstrøms <= KoordinaterStik.LængdeFraOpstrøms
AND t2.LedningID = KoordinaterStik.LedningID) AS Sequence
FROM KoordinaterStik
ORDER BY KoordinaterStik.LængdeFraOpstrøms;
Example of sequenced data output: