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 08:13:12
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
21/09/2005 07:56:11
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01051585
Message ID:
01051587
Views:
9
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform