Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Identify fields where values are different between recor
Message
De
21/09/2005 08:13:12
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
21/09/2005 07:56:11
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01051585
Message ID:
01051587
Vues:
14
This message has been marked as the solution to the initial question of the thread.
>Have two tables that have some of the same fields. I want to look at a specific record in table 1 and find out what field values are not the same as table 2. I don't care about fields that are not the same between the tables. The fields may or may not be in the same order within the two tables. Any thoughts?

Using afields() you could create a string for the common field list - (say lCCommonFields: "f1,f2,f3").
select 1 as _source,&lcCommonFields from t1 ;
union ;
select 2 as _source,&lcCommonFields from t2 ;
into cursor temp nofilter

lcGrpBy = ''
For ix=2 To Fcount()
  lcGrpBy = m.lcGrpBy + Iif(Empty(m.lcGrpBy),'',',')+Transform(m.ix)
Endfor

select * from temp ;
  having sum(_source) # 3 group by &lcGroupBy
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform