Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Bebot Chan
  Where is Bebot Chan?
 Riyadh
 Saudi Arabia
 Bebot Chan
 To: Rene Relucio
  Where is Rene Relucio?
 Quezon City
 Philippines
 Rene Relucio
 Tags
Subject: RE: How to use 'JOIN WITH' to join two .dbf?
Thread ID: 22943 Message ID: 22947 # Views: 2 # Ratings: 0
Version: Visual FoxPro 6 Category: Forms
Date: Wednesday, April 30, 2003 2:34:39 PM         
   


> > I have read a sample:
> >
> > sele 1
> > use 1.dbf
> > sele 2
> > use 2.dbf
> > join with A to J.dbf
> >
> > The last command I'm not sure. And It's not execute. There's something wrong.
> > I just want join the two .dbf to one, and the stucture of the two are same.
> > What can I do?
> > Please give me some samples.
> > Thanks a lot.
> >
>
> Use 1.dbf
> copy to J.dbf
> use j.dbf
> append from 2.dbf
> browse noedit
>


If you mean the old JOIN WITH command in dBase and Foxpro for DOS, you need to have a common field in both tables. Presuming you have EmplNum in both tables 1 and 2, you use the command:


USE Table1 IN 1
USE Table2 IN 2
* You are still in table 1
JOIN WITH Table2 TO Temp FOR Table1.EmplNum = Table2.EmplNum


However, you are better off using the SQL statement where you have a lot more flexibility.






COMPLETE THREAD

How to use 'JOIN WITH' to join two .dbf? Posted by tjfan @ 4/30/2003 12:36:23 PM
RE: How to use 'JOIN WITH' to join two .dbf? Posted by Rene Relucio @ 4/30/2003 2:07:09 PM
RE: How to use 'JOIN WITH' to join two .dbf? Posted by Bebot Chan @ 4/30/2003 2:34:39 PM