AnsweredAssumed Answered

Populateing a child table based on values in the parent table

Question asked by etd001 on Mar 11, 2012
Latest reply on Mar 12, 2012 by philmodjunk

Title

Populateing a child table based on values in the parent table

Post

I have 2 tables, one called BuildingArea and another called FloorLevel.

In the table BuildingArea theres a numeric field called numfloors that holds a numeric value (lets say 4), based on this numeric value I want to populate the FloorLevel table with the corresponding records Floor 1,Floor 2,Floor 3,Floor 4.

In a script i'd do something like the following..

Declare var $floor

select $floor=numfloors from BuildingArea where record = record from inserted

for $I = 1 to $floor

insert "Floor "+$I into FloorLevel

Next $I

Any ideas?

Outcomes