Hello first post here, I need some help!
Sorry not sure if this should go under queries or tables.
Anyway I'm working with quite a large access db (64mb).
I want to merge data from several tables into one table.
Its a supermarket db (not a real one).
Its got a customer and product table
Its also got a table called
agg_c_special_sales_fact_1997
with the fields customer_id and product_id
this shows what customers bought what product.
I want to merge the data from customer, product and agg_c_special_sales_fact_1997 into one big table. I want the merge to be permanent so I can see the which customer (and all their details) bought which product (all details) in one big table.
I ve been trying to do this all day (im quite new to SQL) I copied the data in
agg_c_special_sales_fact_1997 into a new table "new_sales_fact". I added a row called brand_name to that I want to copy from the product table
So far I ve come up with this:
SELECT product.brand_name INTO new_sales_fact
FROM product, agg_c_special_sales_fact_1997
WHERE product.product_id = agg_c_special_sales_fact_1997.product.id;
unfortuantely access asks me enter a parameter value when I run the query.
Could this becuase agg_c_special_sales_fact_1997 is huge, its got 86,000+records?
Can anyone help? I'd be most greatful this has been driving me insane all day!!
thanks in advance!
P.S the database is the test database that comes with Mondrian......
P.P.S I know its not good practice to have all data in one big table but for the purposes of what im doing it will simplfy things a lot!
Sorry not sure if this should go under queries or tables.
Anyway I'm working with quite a large access db (64mb).
I want to merge data from several tables into one table.
Its a supermarket db (not a real one).
Its got a customer and product table
Its also got a table called
agg_c_special_sales_fact_1997
with the fields customer_id and product_id
this shows what customers bought what product.
I want to merge the data from customer, product and agg_c_special_sales_fact_1997 into one big table. I want the merge to be permanent so I can see the which customer (and all their details) bought which product (all details) in one big table.
I ve been trying to do this all day (im quite new to SQL) I copied the data in
agg_c_special_sales_fact_1997 into a new table "new_sales_fact". I added a row called brand_name to that I want to copy from the product table
So far I ve come up with this:
SELECT product.brand_name INTO new_sales_fact
FROM product, agg_c_special_sales_fact_1997
WHERE product.product_id = agg_c_special_sales_fact_1997.product.id;
unfortuantely access asks me enter a parameter value when I run the query.
Could this becuase agg_c_special_sales_fact_1997 is huge, its got 86,000+records?
Can anyone help? I'd be most greatful this has been driving me insane all day!!
thanks in advance!
P.S the database is the test database that comes with Mondrian......
P.P.S I know its not good practice to have all data in one big table but for the purposes of what im doing it will simplfy things a lot!
Last edited: