Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Kat Petitte
  
 
 
 Kat Petitte
 To: Kev InAz
  Where is Kev InAz?
 
 Arizona - United States
 Kev InAz
 Tags
Subject: RE: replace command
Thread ID: 22710 Message ID: 22759 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Friday, April 25, 2003 1:05:57 AM         
   


> > > > not very familiar with foxpro -- just trying to port a program to a different language. could someone tell me what the change to table2 will be following these statements?
> > > >
> > > > select table1
> > > > select table2
> > > > append from table1
> > > > replace all table2.commfac with table1.commfac_1
> > > >
> > > > assume tables as follows:
> > > >
> > > > table1: fields fileno, commfac_1
> > > >
> > > > 100 34.2
> > > > 101 33.9
> > > > 102 12.4
> > > >
> > > > table2: fields fileno, commfac
> > > >
> > >
> > >
> > > * would something like this work for you?
> > > 
> > > SELECT table1
> > > COPY TO table2
> > > ALTER TABLE table2 RENAME COLUMN Commfac TO Commfac_1
> > > 

> >
> > or
> >
> > SELECT fileno, commfac_1 AS commfac FROM table1 INTO table2
> > 

>
>
> DOH! That's what I meant. Dunno why, but I had ALTER TABLE on the brain. hehe

i guess i didn't make myself clear. the above example is existing code -- i need to understand what it is doing, NOT determine a better way to do it. so with that said, can anyone tell me the resulting values in table2?

COMPLETE THREAD

replace command Posted by Kat Petitte @ 4/24/2003 9:18:11 AM
RE: replace command Posted by Kev InAz @ 4/24/2003 9:52:35 AM
RE: replace command Posted by Eric den Doop @ 4/24/2003 10:04:52 AM
RE: replace command Posted by Kev InAz @ 4/24/2003 10:10:50 AM
RE: replace command Posted by Kat Petitte @ 4/25/2003 1:05:57 AM
RE: replace command Posted by Rene Relucio @ 4/27/2003 10:40:30 AM
RE: replace command Posted by Michael Gill @ 4/25/2003 4:32:49 PM