R
Richard Bond
The following query works in ORACLE but when run in ACCESS 2000 returns
"Operation must use an updateable query"
update tab x
set expshare = (select a.exp / b.exp
from tab a, tab b
where b.product = 1
and a.time = b.time
and a.Outlet = b.Outlet)
The table is below
http://www.jburden.com/query.htm (in case the formatting below doesn't work
out)
Product Time Outlet Exp ExpShare
1 1 1 500 1
2 1 1 250 0.5
3 1 1 250 0.5
1 2 1 400 1
2 2 1 200 0.5
3 2 1 200 0.5
1 3 1 400 1
2 3 1 250 0.625
3 3 1 150 0.375
1 4 1 400 1
2 4 1 300 0.75
3 4 1 100 0.25
1 1 2 50 1
2 1 2 25 0.5
3 1 2 25 0.5
1 2 2 40 1
2 2 2 20 0.5
3 2 2 20 0.5
1 3 2 40 1
2 3 2 25 0.625
3 3 2 15 0.375
1 4 2 40 1
2 4 2 30 0.75
3 4 2 10 0.25
I have given an example of what the numeric results should be in the
ExpShare column. (Product 1 is always the denominator, "within Time and
Outlet")
the select statement below returns the ExpShare column in a recordset in
access - its just I can't get it back into the original table without
creating a temporary table.
(select a.exp / b.exp
from tab a, tab b
where b.product = 1
and a.time = b.time
and a.Outlet = b.Outlet)
It would really help if someone could do this all in one move.
regards,
Richard
"Operation must use an updateable query"
update tab x
set expshare = (select a.exp / b.exp
from tab a, tab b
where b.product = 1
and a.time = b.time
and a.Outlet = b.Outlet)
The table is below
http://www.jburden.com/query.htm (in case the formatting below doesn't work
out)
Product Time Outlet Exp ExpShare
1 1 1 500 1
2 1 1 250 0.5
3 1 1 250 0.5
1 2 1 400 1
2 2 1 200 0.5
3 2 1 200 0.5
1 3 1 400 1
2 3 1 250 0.625
3 3 1 150 0.375
1 4 1 400 1
2 4 1 300 0.75
3 4 1 100 0.25
1 1 2 50 1
2 1 2 25 0.5
3 1 2 25 0.5
1 2 2 40 1
2 2 2 20 0.5
3 2 2 20 0.5
1 3 2 40 1
2 3 2 25 0.625
3 3 2 15 0.375
1 4 2 40 1
2 4 2 30 0.75
3 4 2 10 0.25
I have given an example of what the numeric results should be in the
ExpShare column. (Product 1 is always the denominator, "within Time and
Outlet")
the select statement below returns the ExpShare column in a recordset in
access - its just I can't get it back into the original table without
creating a temporary table.
(select a.exp / b.exp
from tab a, tab b
where b.product = 1
and a.time = b.time
and a.Outlet = b.Outlet)
It would really help if someone could do this all in one move.
regards,
Richard