Hey everyone,
I am semi familiar with mySQL syntax but am no way a pro so I have come here to ask you pros if this scenario is at all possible:
I have a "master" table that contains all of my data for my company, it contains sales logs per date example:
1-1-08 customerid whatwasbought price
1-2-08 customerid whatwasbought price
1-2-08 customerid whatwasbought price
1-2-08 customerid whatwasbought price
etc.
My Question:
I would like to know if it was possible to insert into this table (master) from a different table (smallTable) for only certain dates... now since this is going to be a recurring thing I would like to be able to use a variable or something instead of:
Insert into Master from smalLTable customerid, whatwasbought, price where date > 1-2-08
i would like to do it like
Insert into Master from smalLTable customerid, whatwasbought, price where date > currentDate-1
-- This is months and months worth of data and the system I'm building is going to have to automatically do this Insert so that is why i need a dynamicValue and not a staticValue
Is this at all possible or is there a different way to do this? Or am I FUBAR
Thanks for your time