D
Dave
I need to update a field in one table as the product of two fields in
another table.
If I create a DSN called "test" and a linked server in SQL Server, the
following query will do what I need when I execute it from Query Analyzer:
UPDATE test...repamount
SET repamount = (c.splitamount * rs.splitpercent)
FROM test...repamount ra INNER JOIN test...checksplit c ON
c.checksplitid=ra.checksplitid
INNER JOIN test...repsplit rs ON rs.splitid=c.splitid
WHERE ra.checksplitid = 1
But when I try to translate this query into Access SQL, I get a syntax error
that really doesn't tell me what the problem is.
Here is my Access syntax:
sql_u = "UPDATE repamount " _
& " SET repamount = (c.SplitAmount * rs.SplitPercent) " _
& " FROM repamount AS ra INNER JOIN checksplit AS c ON
c.checksplitid=ra.checksplitid " _
& " INNER JOIN repsplit AS rs ON rs.splitid=c.splitid" _
& " WHERE ra.checksplitID = " & txtCheckSplitID.Value
Does anyone see where the error is?
another table.
If I create a DSN called "test" and a linked server in SQL Server, the
following query will do what I need when I execute it from Query Analyzer:
UPDATE test...repamount
SET repamount = (c.splitamount * rs.splitpercent)
FROM test...repamount ra INNER JOIN test...checksplit c ON
c.checksplitid=ra.checksplitid
INNER JOIN test...repsplit rs ON rs.splitid=c.splitid
WHERE ra.checksplitid = 1
But when I try to translate this query into Access SQL, I get a syntax error
that really doesn't tell me what the problem is.
Here is my Access syntax:
sql_u = "UPDATE repamount " _
& " SET repamount = (c.SplitAmount * rs.SplitPercent) " _
& " FROM repamount AS ra INNER JOIN checksplit AS c ON
c.checksplitid=ra.checksplitid " _
& " INNER JOIN repsplit AS rs ON rs.splitid=c.splitid" _
& " WHERE ra.checksplitID = " & txtCheckSplitID.Value
Does anyone see where the error is?