
need help please:joined tables,add new entries based on one table columns
Hi,
I have two tables: Departments and Sells
the following is the structure and the data in the tables
Departments:
Store_Id Department_Id , Department_Name
1 1 A1
1 2 B1
1 3 C1
2 1 A2
2 2 B2
2 3 C2
Sells:(This table is initially empty )
Date,Store_Id,Department_Id,Total_Sells
i need to let user enter the total sells for ALL departments in each store
at the end of the day
The Sells table should look like this after user enter data for store "1"
Date,Store_Id,Department_Id,Total_Sells
29/7 1 1 100
29/7 1 2 200
29/7 1 3 300
what is the best way to achieve this?
is there away to join the table together and get the store_id and the
deprtment_id columns values
for the empty sells table?
what i am doing now is opening two recordstes
one contains the Departments table
and the other the Sells table
than i am adding new records to the Sells table with the values from the
Departments table
(store_id and the deprtment_id columns)
i am using ADO,ACCESS and VB
Thanks in advance
Tomer