Forum Replies Created

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

  • RE: Calculating columns from different tables

    FIGURED IT OUT! (@ 6am in the morning, while i was dreaming in bed) -- aint that some shit

    just had to add a "WHERE" statement

    THANK YOU ALL FOR YOUR...

  • RE: Calculating columns from different tables

    what was happening was that on every new insert, the above rows get affected (updated)

    due to this code. update T2

    set totalpay = hours * (select rate from T1 where T1ID...

  • RE: Calculating columns from different tables

    arun.sas (7/24/2009)


    Hi,

    create the table T2 with the totalpay column as int,

    then create trigger

    thank you very much... works 🙂

    but i am facing another problem when inserting.

    IF YOU COULD PLEAASE TRY...

  • RE: Calculating columns from different tables

    arun.sas (7/24/2009)


    t.hitendra (7/24/2009)


    Hi

    Hi,

    use the compute column in the table like

    create table T2(

    T2ID int primary key,

    hours int,

    T1ID int FOREIGN KEY references T1(T1ID),

    totalpay as (T1ID * hours)

    )

    ]

    Guy needs total=rate*hours.

    Above answer would...

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