Hi Experts,
create table #T1
(
id int,
cname varchar(50),
cform varchar(50),
dependency int
);
insert into #T1 (id,cname,cform)
values
(12, 'S1', NULL),
(11, 'S2', null),
(1, 'C1', 'S2 / 5'),
(2, 'C2', 'C4 + S5'),
(5, 'C3', null),
(7, 'C4', 'C1 - 100'),
(9, 'S5', 'F6 * 8'),
(20, 'F6', 'C3 - C1'),
(4, 'A1', 'C1 * 2 * C2');
What I need to update here is Dependency order (which is done manually now) ? I have explained the reason in my comments.
Your help in deriving the Dependency order is much appreciated? cform would always have some simple calculations.
Regards,
Naveen J V