Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!elroy!cit-vax!ucla-cs!marta From: marta@CS.UCLA.EDU Newsgroups: comp.databases Subject: Informix Lookup Joins Message-ID: <11983@shemp.CS.UCLA.EDU> Date: 5 May 88 18:35:31 GMT Sender: news@CS.UCLA.EDU Reply-To: marta@CS.UCLA.EDU (Phoenix) Distribution: na Organization: Oz Lines: 53 Help!!!!!!!!! I'm want to do something similar to using "Lookup Joins" but that allows modification of the data. I have two tables: *schedule* and *courses*. Table *schedule* is a list of courses taught during the quarter; the primary keys are attributes s_number and s_section [number and section of course]. The table *courses* is a list of courses offered by the department; the primary key is attribute c_number [the number of the course]. *schedule* *courses* s_number c_number s_section c_title s_title c_units s_instructor c_type (Lab, Lect, etc) s_time c_inst_charge s_room When I make an entry into the *schedule* table using a screen form, I want the s_title attribute to be set equal to the c_title attribute for the corresponding course number, i.e.: if s_number = c_number then s_title := c_title The effect should be that of providing default values for a field (course title) depending on another field (course number). As soon as the course number is entered in the table *schedule* the course title is provided from the table *courses* But, if the course title is not correct, I want to be able to modify it. and store it in the table *schedule* (I do NOT want to modify c_title). The reason for this, (yes, there is a 'logical' explanation!) is that we have graduate courses with a generic number (eg 299) which has an official title of "Current Topics in Computer Science". The real title changes everytime it is taught to, for example, "Special Topics in High Speed Computing". If I required that the title be entered every time a course is taught for every course, it would be a big hassle (lookup time, data entry time, error prone, etc.) Any ideas? is this at all possible using Informix? Thank you for your time. ============================================================= | Marta E. Cervantes (213) 206-3321 | | 3731L Boelter Hall, UCLA, Los Angeles, CA 90024-1596 | | UUCP:...!{ihnp4,ucbvax,sdcrdcf,{hao!cepu}}!ucla-cs!marta | | ARPA: marta@cs.ucla.edu | =============================================================