Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating one table with data from another
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00490636
Message ID:
00491309
Views:
8
>Hi Eric,
> This is the code I have so far:
>
>
>close table all
>use student in 0
>use xstud in 0
>
>select student
>scan
>    if seek(student.cstud_key,xstud)
>        replace student.cstud_id with xstud.cstud_id
>    endif
>    select student
>endscan
>
>
>When I run it, the program errors out with "Variable 'xstud' is not found."
>
>
>xstud is a table in my database. I defined a one-to-one relationship between student and xstud on cstud_key. Both tables have a primary cstud_key key and the cstud_id field. I am trying to update the student table with the value in the xstud table using a matching cstud_key.

Put xstud in quotes in the seek()
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California
Previous
Reply
Map
View

Click here to load this message in the networking platform