B
Bunky
I have read the posts regarding trying to do an update linking to Excel files
and how it is now illegal. Fine. I am not touching Excel in anyway. I am
linking via OBDC to a file I create in our AS-400. I read and do some
counting and summing matching to a local collectionstbl and local Staff
table. Then pass the results to another query to do an update to a reporting
table that is local. I still get the above error when I try to run the 2nd
update query to a local table. Ideas are welcome!
Here is the code for the 1st query reading the AS-400 file.
PARAMETERS [Begin Date:] DateTime, [End Date:] DateTime;
SELECT Count(UniquePaymentstbl.ARVACT) AS CountOfARVACT,
Sum(UniquePaymentstbl.SumOfAmtPd) AS SumOfSumOfAmtPd, Collectiontbl.UserId,
Staff.Specialist
FROM (UniquePaymentstbl INNER JOIN Collectiontbl ON UniquePaymentstbl.ARVACT
= Collectiontbl.Arvact) INNER JOIN Staff ON Collectiontbl.UserId = Staff.User
WHERE (((UniquePaymentstbl.TruDate) Between [Begin Date:] And [End Date:])
AND ((Collectiontbl.Result) Is Not Null))
GROUP BY Collectiontbl.UserId, Staff.Specialist;
Here is the code for the second query.
UPDATE Reporttbl INNER JOIN [Cumlative-AS-400] ON Reporttbl.Splst =
[Cumlative-AS-400].Specialist SET Reporttbl.[AS-400Cnt] =
[Cumlative-AS-400].CountOfArvact, Reporttbl.[AS-400Sum] =
[Cumlative-AS-400].SumOfSumOfAmtPd;
Thanks for any and all assistance!
and how it is now illegal. Fine. I am not touching Excel in anyway. I am
linking via OBDC to a file I create in our AS-400. I read and do some
counting and summing matching to a local collectionstbl and local Staff
table. Then pass the results to another query to do an update to a reporting
table that is local. I still get the above error when I try to run the 2nd
update query to a local table. Ideas are welcome!
Here is the code for the 1st query reading the AS-400 file.
PARAMETERS [Begin Date:] DateTime, [End Date:] DateTime;
SELECT Count(UniquePaymentstbl.ARVACT) AS CountOfARVACT,
Sum(UniquePaymentstbl.SumOfAmtPd) AS SumOfSumOfAmtPd, Collectiontbl.UserId,
Staff.Specialist
FROM (UniquePaymentstbl INNER JOIN Collectiontbl ON UniquePaymentstbl.ARVACT
= Collectiontbl.Arvact) INNER JOIN Staff ON Collectiontbl.UserId = Staff.User
WHERE (((UniquePaymentstbl.TruDate) Between [Begin Date:] And [End Date:])
AND ((Collectiontbl.Result) Is Not Null))
GROUP BY Collectiontbl.UserId, Staff.Specialist;
Here is the code for the second query.
UPDATE Reporttbl INNER JOIN [Cumlative-AS-400] ON Reporttbl.Splst =
[Cumlative-AS-400].Specialist SET Reporttbl.[AS-400Cnt] =
[Cumlative-AS-400].CountOfArvact, Reporttbl.[AS-400Sum] =
[Cumlative-AS-400].SumOfSumOfAmtPd;
Thanks for any and all assistance!