C
cmk7471
I'm trying to use the results of a crosstab query to update values in another
table. I'm getting the error that the "operation must use an updateable
query".
This is my crosstab query to summarize labor hours by job number and
operation number:
TRANSFORM Sum([TBL-BLOCS-Labor].LABH_HOURS) AS SumOfLABH_HOURS
SELECT [TBL-BLOCS-Labor].LABH_JOB
FROM [TBL-BLOCS-Labor]
WHERE ((([TBL-BLOCS-Labor].LABH_DEPT)="53"))
GROUP BY [TBL-BLOCS-Labor].LABH_JOB
PIVOT Right([LABH_OPER],3);
This is the update query where I'm trying to update TBL-JobActuals with the
figures as summarized by the crosstab query:
UPDATE DISTINCTROW [Crosstab-Dept54] INNER JOIN [TBL-ActualsSummary] ON
[Crosstab-Dept54].LABH_JOB = [TBL-ActualsSummary].JobNum SET
[TBL-ActualsSummary].A10 = [010], [TBL-ActualsSummary].A20 = [020],
[TBL-ActualsSummary].A30 = [030], [TBL-ActualsSummary].A40 = [040],
[TBL-ActualsSummary].A50 = [050], [TBL-ActualsSummary].A260 = [260],
[TBL-ActualsSummary].A270 = [270], [TBL-ActualsSummary].A280 = [280],
[TBL-ActualsSummary].A290 = [290];
There is a one-to-one relationship between the job number in the crosstab
query and the job number in the table I'm trying to update. How can I make
this work?
Thanks!
table. I'm getting the error that the "operation must use an updateable
query".
This is my crosstab query to summarize labor hours by job number and
operation number:
TRANSFORM Sum([TBL-BLOCS-Labor].LABH_HOURS) AS SumOfLABH_HOURS
SELECT [TBL-BLOCS-Labor].LABH_JOB
FROM [TBL-BLOCS-Labor]
WHERE ((([TBL-BLOCS-Labor].LABH_DEPT)="53"))
GROUP BY [TBL-BLOCS-Labor].LABH_JOB
PIVOT Right([LABH_OPER],3);
This is the update query where I'm trying to update TBL-JobActuals with the
figures as summarized by the crosstab query:
UPDATE DISTINCTROW [Crosstab-Dept54] INNER JOIN [TBL-ActualsSummary] ON
[Crosstab-Dept54].LABH_JOB = [TBL-ActualsSummary].JobNum SET
[TBL-ActualsSummary].A10 = [010], [TBL-ActualsSummary].A20 = [020],
[TBL-ActualsSummary].A30 = [030], [TBL-ActualsSummary].A40 = [040],
[TBL-ActualsSummary].A50 = [050], [TBL-ActualsSummary].A260 = [260],
[TBL-ActualsSummary].A270 = [270], [TBL-ActualsSummary].A280 = [280],
[TBL-ActualsSummary].A290 = [290];
There is a one-to-one relationship between the job number in the crosstab
query and the job number in the table I'm trying to update. How can I make
this work?
Thanks!