Master-Detail Form Using 1 Table (self-referencing)

Oracle has a table called EMP. This contains information about an employee, and has empno as primary key. Another field is called mgr which contains the empno of the manager. If the employee is a manager, the value of mgr is null (or zero).

Need your help on how to go on creating a master-detail screen/form for this kind of setup. Thank you in advance.

Hi Dantesan

You could follow the ScriptCase samples to create a Master-Detail. Then you only need to specify the table and the link condition, in this particular case, the detail table is the same as the master, but there’s no problem with that: you only need to specify the WHERE sentence for the detail table like this: “WHERE mgr = [empno]”, and of course put the master empno value in the global var.

Regards,

That’s great and will definitley try the solution you provided. Thank you very much tfertil.