Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Bob Stranks
  Where is Bob Stranks?
 Vancouver
 Canada
 Bob Stranks
 To: Bernard Bout
  Where is Bernard Bout?
 Brisbane
 Australia
 Bernard Bout
 Tags
Subject: RE: joining files with update sql
Thread ID: 154465 Message ID: 154541 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Monday, December 17, 2007 4:58:32 PM         
   


Sorry. Nothing to do with Linux. I will try to be more careful where I post next time.

> > Hi,
> >
> > I am collecting the fields from one file into another with
> >
> > update master set master.f1=sourcefile.f1,master.f2=sourcefile.f2 from sourcefile where master.symbol=sourcefile.symbol
> >
> > Anyway this is working okay but it requires that the fields f1, f2 and so on are in the master file already. I am using the alter table add column to add the fields to master but this slows the process down a lot. I was wondering if "join" can be included in the above to create the f1, f2, and so on fields in master automatically during the update sql, if they are not in master but they are in sourcefile. I do not want to join the 2 files and create a 3rd file and rename it though so I am using "update: instead of a left join or right join sql.
> >
> > For example I would want this to occur:
> >
> > master file fields at start
> > symbol,miscfield
> >
> > source file fields at start
> > symbol, f1,f2,f3,f4
> >
> > result file master
> > symbol,miscfield, f1,f2,f3,f4
> >
> >
> > thx
> > bob
>
> And what has this to do with Linux may I ask? That is the category you posted in.
>
> Bernard
>
> ** If you see someone without a smile, give em one of yours :) **

ENTIRE THREAD

joining files with update sql Posted by Bob Stranks @ 12/16/2007 5:38:38 PM
RE: joining files with update sql Posted by suhas hegde @ 12/16/2007 6:46:48 PM
RE: joining files with update sql Posted by Bob Stranks @ 12/16/2007 7:59:52 PM
RE: joining files with update sql Posted by Bernard Bout @ 12/17/2007 8:01:55 AM
RE: joining files with update sql Posted by Bob Stranks @ 12/17/2007 4:58:32 PM
RE: joining files with update sql Posted by Andy Kramek @ 12/17/2007 12:59:34 PM
RE: joining files with update sql Posted by Bob Stranks @ 12/17/2007 4:57:53 PM
RE: joining files with update sql Posted by Daniel Hofford @ 12/19/2007 5:12:01 AM
RE: joining files with update sql Posted by Andy Kramek @ 12/19/2007 12:06:35 PM