Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement