sql sum data from multiple tables

The results from your query are wrong because the values you are trying to summarize are being grouped, which causes duplicate values to be included in the SUM. You could solve it with a couple of sub-selects: SELECT AP1.[PROJECT], (SELECT SUM(AP2.Value) FROM AP AS AP2 WHERE AP2.PROJECT = AP1.PROJECT) AS SUM_AP, (SELECT SUM(INV2.Value) FROM INV … Read more

Microsoft Jet wildcards: asterisk or percentage sign?

The straight answer is that the behaviour of the wildcard characters is dependent on the ANSI Query Mode of the interface being used. ANSI-89 Query Mode (‘traditional mode’) uses the * character, ANSI-92 Query Mode (‘SQL Server compatibility mode’) uses the % character. These modes are specific to ACE/Jet and bear only a passing resemblance … Read more