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 09:15:56
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
21/09/2005 08:13:12
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01051585
Message ID:
01051604
Vues:
17
I just knew you were going to be the one to answer this!

I'm ok up until the last line. I think the "# 3" is causing a syntax error. What does that do?


>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform