Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Matching two tables
Message
 
 
To
03/03/2010 07:06:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01452221
Message ID:
01452232
Views:
57
>Both are characters.
>
>I have sample data on both tables with no matching records. But when I run the code, it results to 200+ records.

Evelyn,

As Gregory pointed out, you made a typo in the JOIN condition - you used the same table twice on both side of expression, therefore you got a cartesian join.

You need to join on
SELECT * FROM mds ;
INNER JOIN acic ;
ON acic.checkno = mds.checkno and acic.acctno = mds.acctno ;
INTO CURSOR csr_Match
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform