Solved

Comparing 2 tables in Delphi 1.0 or Reportsmith(sql)

Posted on 1997-10-17
2
163 Views
Last Modified: 2010-04-04
hi....

I need to comapre 2 tables of same format(one old, one updated) the field values being yes/no. I need to produce a discepency report where only the unmatched fields are displayed.

I have an idea :
Take field values from both tables and place them in variables in Delphi then comparing them and outputting the unmatched variables to a new tempororay table that is eliminated after this report is generated.

How would you suggest that I solve this problem. Should I use Delphi 1.0 or should I use Reportsmith for processing.

Yours Sincerely
sprawler
0
Comment
Question by:sprawler
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 50 total points
ID: 1347822
I have another idea,
Define in one of the tables an calculated field. Then in OnCalcFields Event. Check the two fields and place the result in the calculated field.

procedure TForm1.OnCalcFields..........;
begin
Table2.FieldByName([NoMatch]).AsBoolean :=
(Table1.FieldByName([Value]).AsString <> Table2.FieldByName([Value]).AsString)
end;

After this filter this table on all the values with nomatch = true;

Look out! Two tables have to be in sync.

For making report, it depends. If you want to make a very beautifull layout, you should use reportsmith or Quickreport. But if you use reportsmith you have to deploy that program as wel with your own program. If you just want to have a print-out, I advise to use Delphi. With Delphi you can also make beautiful reports but that takes a little more time and isn't so easy.
Wich program to process? Depends on which you take to make your report.
But if yuo plan to use the results also for other processing, use D1. I don't know if you know it but you can also use sql in D1, not only in reportsmith.

Have fun,
c.u. ZifNab;
0
 

Author Comment

by:sprawler
ID: 1347823
Hi ...

 That is a good idea ....

I do now about the SQL capabilities of Delphi but I am not fully clued up on SQL code. If possible, would you pleez suggest how
I shoul make use of the SQL. An example will help tremendously.

Tanx
sprawler


0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question