Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Matching Fields with Tables using .dbc
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00649793
Message ID:
00649909
Vues:
14
Thanks for your reply. I'm fairly new to VFP...if I'm understanding your code correctly, the SELECT statement is dealing with two tables, whereas I would like to capture information from one .dbc file. What I would like to do is this:

SELECT objectname, parentid, objectid, objectype INTO CURSOR csrObjects NOFILTER FROM Main.dbc WHERE objectname = 'Field' or objectname = 'Table'

The cursor would look something like this:

Objectname, ParentId, ObjectId, Objecttype
first_field, 1, 5, Field
second_field, 1, 6, Field
first_table, 2, 1, Table
etc...

What I then need to do is create another cursor containing the field names with its corresponding table names by matching the ParentId of the 'Field' objecttypes to that of the 'Table' objecttype (in this example, 1 is the common value that relates the two objecttypes):

FldName TblName
first_field first_table
second_field first_table

It is this last part I do not know how to produce. Does this make sense?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform