Advertisement

06.09.2008 at 03:28PM PDT, ID: 23470793
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

Need Help Setting up Audit History Table for Ar Transactions.

Asked by vsllc in SQLBase, MS SQL Server, MySQL Server

I hope I can explain this so it makes sense.

I'm using a SQL DB that has two tables that track the application of A/R activity (Payments, Credits, Charges, refunds, invoices, etc.).  Table 1 records the initial entry of the a/r item and table 2 records the amount of the application and where it was applied to and from.  The problem I have is that the system allows a user to change where a payment/credit/ect. was applied but does not track it.  

For example if check #2 for $100 was originally applied to cust 1 invoice 10, table 1 would record the the initial entry of check #2 for $100 and assign it a unique id.  Table 2 would record the application of the $100 from check #2 (Using the unique id from table 1) to invoice 10 (using the unique id from table 1 created for this invoice) on customer 1.  If a user then changed the application to be $25 to invoice 20 and $75 to invoice 30 on customer 1, table 2 would be updated to reflect the new application.  There is not a new record created for the new application.  The system reuses the existing uinque id's for Check #100 from table 1 and deletes the old application data to invoice 10 to reopen the invoice.

What I need to do is create a historical record of these changes so I can track if someone unapplies money and moves it somewhere else.  I'm not sure the best way to do this but here is what I was thinking:

1.  Create a backup of table 2.
2.  Every night compare the backup to the current table and write any differences to a 3rd table.
3.  Once step 2 is complete, overwrite the previous days backup with a backup of the current table.
4.  Repeat this process, each day adding (not overwriting) the changed transactions to the 3rd table.

Is this the best approach and how would I create a script to say compare table2backup to table2 and add the records that no longer exist in the current table from the backup to the third table?

Thanks.Start Free Trial
[+][-]06.09.2008 at 03:41PM PDT, ID: 21747238

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.09.2008 at 03:44PM PDT, ID: 21747256

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SQLBase, MS SQL Server, MySQL Server
Sign Up Now!
Solution Provided By: Yiogi
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.09.2008 at 04:05PM PDT, ID: 21747360

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.09.2008 at 04:08PM PDT, ID: 21747373

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.09.2008 at 04:14PM PDT, ID: 21747398

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.09.2008 at 04:19PM PDT, ID: 21747417

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.09.2008 at 04:23PM PDT, ID: 21747440

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.09.2008 at 04:26PM PDT, ID: 21747452

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.23.2008 at 02:35PM PDT, ID: 22074147

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628