I don't get it about your db design/structure. Let's call Main Table (Parent) and Related Table(s) (Child/Children). In that case, a child is dependent on its parent and the degree of that dependency (cardinality) is determined by the relationship (chiefly mandatory or optional). Therefore, before we 'add a child', we got to know who the child belongs to (parentID), so as to include parent data with child data during child data insertion/capture. From you what described, you wanted to reverse it in the data capturing process, hmm? I don't know how this function works. Having said that, as for information retrieval, things could be very dynamic.
Li, Chunshen (Don) http://68.32.61.40/datadata/dataman.cfm >I didn't realize until this project that all of my relational database >work was kind of one-dimensional, all of the related tables were built >with dropdowns to feed the main table in mind. None of the related >tables update information by users. > >Now I have a project where I need to add several fields to a >well-established table in a db. However, only one in 500 new inserts >would need these fields, so a related (sub)table is the way to go to save >space. The problem is, not one of my references addresses an example of >multiple Inserts into a DB. > >I've thought of two approaches. Is there a best practice? (or something >I haven't thought of?) > >Action_Form > >Query>insert info into new related table >Query>get row number from new related table >Query>pass the row number of the new related table to the form and Insert >the entire form into main table > >all in one shot > >or > >a series of forms and action pages that kind of step through the transaction. > >Rick > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

