Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quickly find field names in tables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00037420
Message ID:
00037425
Vues:
25
> If you have a field name and want to find which table it's in quickly and > efficiently, is there anything better than the following: > > SELECT table1 > =AFIELDS(aArray1) > FOR i = 1 TO ALEN(aArray1,1) > IF myfield = aArray1(i,1) > itsintable1 = .T. > ENDIF > IF itsintable1 = .T. > SELECT table2 > =AFIELDS(aArray2) > FOR i = 1 TO ALEN(aArray2,1) > IF myfield = aArray2(i,1) > itsintable2 = .T. > ENDIF > > ...or is this what I have to do, unless I work around it? If the tables are in the .DBC, then you could open the .DBC and select objectname ; from {DBC} ; where objectid in ; (select parentid from {DBC} where ObjectType = "Field" and ObjectName = m.MyField) ; into array laTables /Paul
Paul Russell
EMail: prussell@fox.nstn.ca
Phone: (902) 499-5043
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform