October 22, 2013 at 2:32 am
Hi
i am developing a small db which has the following requirement...
A product cost can be created for a future year/month. All transaction before that date use the current cost. All transaction after that date will use the new cost.
If i have my product table with a cost field in how do i create a table that uses the above rule? i.e. the cost will change based on future cost changes.
hope that makes sense.
Thanks
October 28, 2013 at 4:29 pm
A typical Price Master table would look like the one below:
Product ID--------Price------From Date-------To Date
P001-------------100-------1/1/2013---------12/31/2013
P001-------------150-------1/1/2014---------12/31/2014
P001-------------175-------1/1/2015---------
Your logic would pick up the Price based on the current date residing between From Date and To Date.
October 28, 2013 at 4:36 pm
So with the current table you need to have two more columns From Date and To Date.
Else have a new table as Price Master as detailed above.
Let me know if this meets your requirements.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply