Find dependency with in different data of columns with in a table?

  • 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

  • Scrap the whole thing and use the right tool for the job.  You're trying to use a database to replicate a spreadsheet.  Just use a spreadsheet in the first place.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply