Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 To: sri kishan
  Where is sri kishan?
 
 India
 sri kishan
 Tags
Subject: RE: how we can update record with one sql
Thread ID: 310834 Message ID: 310843 # Views: 43 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: General VFP Topics
Date: Saturday, June 25, 2011 11:27:29 PM         
   


> we are using this kind of sql for update records
>
>
> update table1 set table1.filed1=table2.field1 where table1.pk=table2.pk
> 
> if _tally=0
>   insert into table1 (field1) select (field1) from table2 where ...
> endif
> 
> 

>
> how we can do this with one sql.
>
> Regards

The outcome of your UPDATE will depend entire on where you've put the recordpointer in Table2.
It will NOT work like a JOIN and seek matches for all the Table1.pk throughout Table2.

-Anders


https://www.foxite.com/forum/home.aspx

ENTIRE THREAD

how we can update record with one sql Posted by sri kishan @ 6/25/2011 7:47:45 PM
RE: how we can update record with one sql Posted by Stefan Wuebbe @ 6/25/2011 8:27:20 PM
RE: how we can update record with one sql Posted by sri kishan @ 6/25/2011 8:50:01 PM
RE: how we can update record with one sql Posted by Samir H. @ 6/25/2011 8:33:37 PM
RE: how we can update record with one sql Posted by sri kishan @ 6/26/2011 8:11:20 AM
RE: how we can update record with one sql Posted by Samir H. @ 6/26/2011 10:49:14 AM
RE: how we can update record with one sql Posted by Anders Altberg @ 6/25/2011 11:27:29 PM