Re: General SQL question
Posted in 2005
andris_sh@yahoo.com wrote: > Hi, all. > > This question is not directly related to Informix, more a generic one. > Still, I always had received very good help in this ng. > > Thing is, I am responsible for database design in one DWH solution. It > is quite complicated, about 100 tables and growing. Recently analysts > decided that, in regards of latest business analysis requirements, DWH > has to contain reference table between two tables, as they are in > many-to-many relationship. > > Now, question is - how to fill keys in this reference table? Is your question how to physically determine the matching keys to load into the join table (also known as a gerund) or how to do so without violating the relational integrity constraints you would like to have in place? Art S. Kagel > Data load process at first fills data in respective tables, then > updates foreign keys between tables and theh time would be to fill > reference table, which contains only two fields, foreign keys to two > other tables. > > I have no idea, how to write procedure, which would fill and update > reference table, can you suggest some exapmle SQL script? Thanks! >