Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comparing
Message
 
To
26/06/2001 07:23:44
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00523261
Message ID:
00523758
Views:
8
This message has been marked as a message which has helped to the initial question of the thread.
>hey john,
>
>i forgot to mention that there are certain fields that i want to exclude from the comparison.
>
LOCAL ARRAY laFields
LOCAL lcOn, lnI

lcOn = ""
SELECT 
FOR lnI = 1 TO AFIELDS(laFields)
  IF !INLIST(laFields[lnI,1], ...list of fields to exclude...)
    lcOn = lcOn + IIF(EMPTY(lcOn),"ON "," AND ")
    lcOn = lcOn + "FreeTable." + laFields[lnI,1] + " = DBCTable." + laFields[lnI,1]
  ENDIF
ENDFOR

SELECT FreeTable.* ;
  FROM FreeTable ;
  LEFT JOIN DBCTable &lcOn ;
  WHERE FreeTable.Field1 # DBCTable.Field1
Brien R. Givens

Brampwood Systems
Previous
Reply
Map
View

Click here to load this message in the networking platform