Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comparing two views
Message
 
 
To
12/07/2002 14:03:09
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00678189
Message ID:
00678255
Views:
12
Here is one brute approach: (assuming they have the same structure):
select view1
copy to temptable1
select view2 
copy to temptable2

select * from temptable1 ;
union ;
select * from temptable2 ;
into cursor FindDif nofilter

if _tally = reccount(temptable1)
   =messagebox('Views are identical!',48,'No difference')
else
  select KeyID, count(*) as CntDups from FindDiff ;
  group by KeyID having CntDups>1 into cursor curNotIdentical
  
  select * from FindDiff where KeyID not in ;
 (select KeyID from TempTable1) ;
  union ;
  select * from FindDiff where KeyID in ;
   (select KeyID from curNotIdentical)  ;
  into cursor curDifference
  * This cursor has all records, 
  * which either not in view1, but in view2 
  * or have difference in any of the fields   
endif
>I have two parameterized views. One is in page1 and the other one is in page2 of the pageframe. Everytime these two views are requeried, I have to compare their content if they are equal. If not, I will display their differences on the form. How can I compare the content of these 2 views in MM? Does that mean that I have to override any of the existing methods?
>
>Thanks a lot and have a nice weekend.
>
>Nerissa Dela Rosa
>McFadden's
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform