Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Base table updates from a view
Message
From
13/08/1999 13:51:10
 
 
To
13/08/1999 12:34:11
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00253460
Message ID:
00253560
Views:
12
>I have a remote view, created soley to reduce query time, that has 50 updateable fields scattered over five tables. I am hoping that one of you can tell me there is a better way to update the base tables than writing UPDATE yadada SET base_field_n = viewField_n where etc. for each of the base tables.
>
>Were these local tables, the prefered option would be a regular set of relationships in the data environment.
>
>As remote views the best option would be nested selects.
>By nested selects I mean, from a QBF query on the parent, then on load data for child1, where key in qb_results, for bridge_table_key in QBF results, for bridge_table_child in bridge_table results, etc. This way, if selecting six records to work on, there would only be 6 bridge_table records loaded, not 1200+

Views have an updating mechanism built in, called TABLEUPDATE(). TABLEUPDATE builds your update statement behind the scenes from the criteria you specifid in the view definition. Views are capable of updating more than one table at once, but I don't recommend it. If you append a blank record into a view, it attempts to create a blank record in each of the source tables. There are lots of bad things that come from trying to have a single view update multiple tables.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform