Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Identify fields where values are different between recor
Message
From
21/09/2005 09:15:56
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
21/09/2005 08:13:12
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01051585
Message ID:
01051604
Views:
7
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform