Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy the contents of 1 field to another field using 2 ta
Message
From
16/02/2004 04:50:30
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00877557
Message ID:
00877573
Views:
12
>I am trying to replace a field named modacad.path in a table called modacad with a field named paths.path in a table called paths where the mainkey (field) is the same in both tables. Here is my syntax:
>
>
>SET DEFAULT TO 'C:\Pathproblem'
>select paths
>go top
>scan
>  if seek(mainkey,'modacad')
>     replace modacad.paths with paths.path
>  endif
>endscan
>
>
>I cannot get this to work. Can anybody help me please?
>
>MAny Thanks

Neil,
You could use Update-SQL :
SET DEFAULT TO 'C:\Pathproblem'
select paths
local luMainKey
scan
  luMainKey = paths.MainKey
  update paths set path = paths.path ;
     where mainkey = m.luMainkey
endscan
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform