473,799 Members | 3,146 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to track versions of a record?

I have a table that contains a product's forecasted revenue for each
month. So:
tbl_Forecast
Forecast_ID
Product_ID
Year
Month
Revenue

What's a good table design to track different versions of a
record---revenue is changed for the product that month?
tbl_Forecast
Forecast_ID
Product_ID
Year
Month
Revenue
(Version_ID)
tbl_Version
Version_ID
...

--OR--

tbl_Forecast
Forecast_ID
Product_ID
Year
Month
Revenue
tbl_Forecast_Ve rsion
Forecast_ID
Version_ID
tbl_Version
Version_ID
...

--ALSO--

How would I basically query the tables to show the current (version)
total revenue for all product...and the previous (version) total
revenue for all product? I'm thinking maybe a subquery using MAX, but
how would the query know to use version 3 (where there's 4 versions)
of product A and version 1 (where there's only one version) of product
B, C, etc.?

Thanks for any tips...
Nov 12 '05 #1
1 1528
John wrote:
I have a table that contains a product's forecasted revenue for each
month. So:
tbl_Forecast
Forecast_ID
Product_ID
Year
Month
Revenue

What's a good table design to track different versions of a
record---revenue is changed for the product that month?
tbl_Forecast
Forecast_ID
Product_ID
Year
Month
Revenue
(Version_ID)
tbl_Version
Version_ID
...

--OR--

tbl_Forecast
Forecast_ID
Product_ID
Year
Month
Revenue
tbl_Forecast_Ve rsion
Forecast_ID
Version_ID
tbl_Version
Version_ID
...

--ALSO--

How would I basically query the tables to show the current (version)
total revenue for all product...and the previous (version) total
revenue for all product? I'm thinking maybe a subquery using MAX, but
how would the query know to use version 3 (where there's 4 versions)
of product A and version 1 (where there's only one version) of product
B, C, etc.?

Thanks for any tips...


Unfortunately I don't have a lot of time to read through this and give a
better response....

....but maybe a simpler idea is to have a seperate table that holds the
history and one to hold the current version? Makes getting the current
easy and viewing a list of the history easy as well.

There is always 100 ways to "skin a cat" though :)
--
regards,

Bradley
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3190
by: SQLDBA | last post by:
What would be the best practice to follow to keep track of MS SQL server changes... Stroed procs, tables, views, triggers, indexes, DTS and also jobs ect.... I am not quite sure how Source safe works with sql server. Any other way to do this... Even if its manual work, its okey.. I would appreciate if any of the DBA's let me know how they are facing this issue.... Thanks in advance...
2
4186
by: Uwe Range | last post by:
Hi to all, I am developing a database where, with time, it proved to be necessary to keep track of the changes to the data. It is fairly easy to keep track of the time when a record was changed (afterupdate event) -> Is there there a smart way of finding out which field has been changed? I don't want to set a procedure on every field on the edit form for keeping track of that, because the forms will be changed from time to time.
0
1218
by: Arno R | last post by:
Hi there, I have a MsGraph-chart in my report. I just want to display a graph for each record (just plain bars for a value each year, nothing fancy) On one PC where only Access 97 is installed everything works fine. On my production-PC where I have installed several Office versions (all in different folders) some graphs just NOT represent the values of the corresponding record...
14
1572
by: David Garamond | last post by:
begin; update t set val=val+1; -- 1000 times commit; How many record versions does it create? 1 or 1000? I'm implementing a banner counter which is incremented at least 2-3 millions a day. I thought I'd cheat by only commiting after every few minutes. Would that work or would I still create as many record versions? --
0
2388
by: Sharath | last post by:
"Inspired" by the huge success of our first two automation fast track batches We are forced to start third fast track automation batch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++ Course on Automation, QTP Basics and Advanced, Quality Center and project ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
0
2198
by: Sharath | last post by:
We are glad to inform you that "Inspired" by the huge success of our first three automation fast track batches We are forced to start fourth fast track automation batch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Course on Automation, QTP Basics and Advanced, Quality Center and project
0
2076
by: Sharath | last post by:
We are glad to inform you that "Inspired" by the huge success of our first four automation fast track batches We are forced to start fifth fast track automation batch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Course on Automation, QTP Basics and Advanced, Quality Center and project
2
9308
by: zoro25 | last post by:
Hi, I'm creating a database and I need to find a way to track the changes to a record, more exactly, I need to know who makes changes to each record, as the users can only modify their own records. I have one table where all the data is stored and I have between 50-100 users. Due to the high number of users, I would like to use the Windows login user ID instead of having to create user ID in Access. Is it possible? If yes, what is the...
3
4194
by: dirksza2009 | last post by:
Hi, I've made a multi user (4 end users) database in Access 2000. I've made data tables, reference tables etc which sits on a shared drive and I've made individual front ends for the end users which gives them specific views of the data. I'd like to track all the changes made to a record which works find with the following code : basAuditTrail: Option Compare Database Const cDQ As String = """" Sub AuditTrail(frm As Form, recordid As...
0
9688
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9546
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10490
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10260
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9078
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7570
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5590
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4146
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.