Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Browse?
Message
 
 
To
20/12/1996 10:17:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00015660
Message ID:
00016040
Views:
35
There are some things that VFP does wonderfully, and ...
>>SELECT child
>>SET ORDER TO childOrder
>>SELECT parent
>>SET RELATION TO childOrder INTO child
>>SET SKIP TO CHILD
>>BROWSE

is exactly the technique to get the desired results. Except:
>>SET RELATION TO childOrder INTO child
should read more like:
SET RELATION TO expression INTO child, where "expression" is the combination of fields in the parent table that matches the index expression for the child table.
Forget the SQL select statement... using it basically denormalizes your data (and destroys what you are trying to do).

If you have to do it with the SQL query, you will need to loop through the result table. This assumes that the table is physically sorted and not currently indexed on p1f1, p1f2, etc.
Lastp1f1=p1f1
skip
Scan Rest
if p1f1=lastp1f1
replace p1f1 with "", p1f2 with "", etc.
else
Lastp1f1=p1f1
endif
endscan
Previous
Reply
Map
View

Click here to load this message in the networking platform