Compare and find chnages

  • Thread starter Thread starter Prav
  • Start date Start date
P

Prav

Hi, I have the tbl_prj table backed up quarterly. I took the last year's
backup (4 tables) and combined into one table. A project can have its code
(prj_code) changed during its life - from one code to another and there is a
possiblity it went back to the previous one.How can I find what the number of
prj_id that had project code changed. For example Prj_ID 100 has 4 records
(can be more), I was thinking to compare the prj_code of the first record of
that prj_id to the other 3. Then increment a counter if there is a change.
 
Hi, I have the tbl_prj table backed up quarterly. I took the last year's
backup (4 tables) and combined into one table. A project can have its code
(prj_code) changed during its life - from one code to another and there is a
possiblity it went back to the previous one.How can I find what the number of
prj_id that had project code changed. For example Prj_ID 100 has 4 records
(can be more), I was thinking to compare the prj_code of the first record of
that prj_id to the other 3. Then increment a counter if there is a change.

You're assuming that we have more knowledge of your table structure than you
have posted.

What are the actual fields of your table? What are the four tables and how are
they related? What do you mean by "the first record", considering that Tables
have no order and that there is no usable "first" or "last" when it comes to
table records? What "counter" do you want to increment?
 
What are the actual fields of your table?
Combined Table fields are only:- Prj_ID, Prj_Code, Snapshot_Date.

What are the four tables and how are they related?
The tables are quarterly backups of the tbl_Prj table. The relationship is
they all have the same fields but different number of records. I did an
append table to combine the tables.

What do you mean by "the first record", considering that Tables
have no order

For example, there are 100 records. There would be at least 4 Prj_IDs of the
same number (groupby).

and that there is no usable "first" or "last" when it comes to
table records?

I was thinking to compare the prj_id of the same project and see if the
prj_code has changed. Then compare to the next prj_id of a different project,
and so on.

What "counter" do you want to increment?

The counter is to count how many prj_id had a prj_code changed.
 
Back
Top