Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append a record two tables at the same time
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Append a record two tables at the same time
Divers
Thread ID:
00113731
Message ID:
00113731
Vues:
58
Could I append a record to two tables at the same time?

For example, there are two tables, basic_info and office_info. basic_info has fields staff_code and staff_name. office_info has fields staff_code and phone_nos.

basic_info : staff_code, staff_name
office_info : staff_code, phone_nos

I created a local view named INFO by the following command:

Create sql view INFO as select; basic_info.staff_code,basic_info.staff_name,office_info.phone_nos; where basic_info.staff_code = office_info.staff_code;
union;
select office_info.staff_code, " ", " " where; basic_info.staff_code=office_info.staff_code

I want to use the local view to append a new record with all set of data to basic_info and office_info. Does it possible?

I tried it but was not success. I could append a new record but only appended the staff_name and phone_nos, staff_code was still blank. If I assign staff_code to be a foreign key, the browser would not allow me to leave because I entered a empty field.
Can you live without the earth?
Please remind that :
"Yung Hung" is my first name;
"Yeung" is my last/family name.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform