Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Matching Fields with Tables using .dbc
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00649793
Message ID:
00649909
Views:
13
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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform