syntax of sum in SQL
I'm trying to find the summation of a column called Total_Months in
Access. In the sql, I type in:
( SELECT Sum([dbo_tblPermits].Total_Months) FROM [dbo_tblPermits] WHERE
(dbo_tblPermits.PermitNo LIKE 'AR%')) AS mySum
In addition, dbo_tblPermits is the name of my table and PermitNo is the
various kinds of permits that I have.
However, I get an inaccurate answer. Then I tried the DSum formula which is:
( SELECT DSum("Total_Months", "dbo_tblPermits", "dbo_tblPermits.PermitNo
LIKE 'AR%'") )AS myDSum
However, I get a syntax error. I've been looking at my code for the past
two days, but I'm not getting anywhere.