Show difference between 2 tables

A

Andrew@Rays

Hi,

I have 2 tables - Tbl_Old & Tbl_New. The field names are identical.

The layout is:

The_Date, MTD_Sales, SOH (MTD stands for 'Month To Date')

Currently I received the data daily with the MTD_Sales accumulating daily.

I want to insert into a 3rd table Tbl_Current with the MTD_Sales field to
show the difference between Tbl_Old & Tbl_New for MTD_Sales.


eg Tbl_Old MTD_Sales = 50, The_Date = 29/06/09
Tbl_New MTD_Sales = 70 The_Date = 30/06/09

Tbl_Current shows The_Date Sales
29/06/09 50
30/06/09 20
 
H

hunterpaw via AccessMonster.com

Andrew@Rays said:
Hi,

I have 2 tables - Tbl_Old & Tbl_New. The field names are identical.

The layout is:

The_Date, MTD_Sales, SOH (MTD stands for 'Month To Date')

Currently I received the data daily with the MTD_Sales accumulating daily.

I want to insert into a 3rd table Tbl_Current with the MTD_Sales field to
show the difference between Tbl_Old & Tbl_New for MTD_Sales.

eg Tbl_Old MTD_Sales = 50, The_Date = 29/06/09
Tbl_New MTD_Sales = 70 The_Date = 30/06/09

Tbl_Current shows The_Date Sales
29/06/09 50
30/06/09 20

Hi Andrew,

The best practice is to not store calculated fields in tables. Queries are
made to handle this type of thing.

Best Regards
 
Top