Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Query Question about 4 tables

Discussion in 'Information Technology' started by JOM, Nov 16, 2005.

  1. JOM

    JOM
    Expand Collapse
    Guest

    I have 4 tables,
    tbl1 has fieldX, filedY and fieldZ
    tbl2 has fieldA and fieldB
    tbl3 has fieldC
    tbl4 has fieldD

    What I want to archieve is as follows
    tbl1.fieldX + tbl2.fieldY - tbl3.fieldZ
    +tbl2.sum(fieldA)+tbl3.sum(fieldc)=tbl4.fieldD

    part2:
    tbl3.fieldC=Avg(tbl4.fieldD)
    Please help!
     
  2. Loading...

    Similar Threads Forum Date
    Query about Jhatka Meat by Shooting in Head Sikh Sikhi Sikhism Aug 26, 2011
    Who is a sikh? A non sikh friend's query!! Sikh Sikhi Sikhism Apr 30, 2010
    General Query Hard Talk Sep 4, 2008
    Power of pauri's in Japji Sahib query Sikh Sikhi Sikhism Aug 17, 2006
    Sikhism a query Book Reviews & Editorials Aug 2, 2005

  3. Ofer

    Ofer
    Expand Collapse
    Guest

    How do you link the tables?
    Or mybe there is only one record in each table, except of the table where
    you sum the values?
    Do you sum all the records in the table, or there is a filter?

    We need more details.
    --
    I hope that helped
    Good Luck


    "JOM" wrote:

    > I have 4 tables,
    > tbl1 has fieldX, filedY and fieldZ
    > tbl2 has fieldA and fieldB
    > tbl3 has fieldC
    > tbl4 has fieldD
    >
    > What I want to archieve is as follows
    > tbl1.fieldX + tbl2.fieldY - tbl3.fieldZ
    > +tbl2.sum(fieldA)+tbl3.sum(fieldc)=tbl4.fieldD
    >
    > part2:
    > tbl3.fieldC=Avg(tbl4.fieldD)
    > Please help!
     
  4. JOM

    JOM
    Expand Collapse
    Guest

    These are different fields obvously there is a link that will link all the
    tables and that would be EmplID I only grabbed a few fields from each of the
    table. What am trying to find out is how I can grab a few fields that can be
    calculated and paste the infor in a different table..

    "Ofer" wrote:

    > How do you link the tables?
    > Or mybe there is only one record in each table, except of the table where
    > you sum the values?
    > Do you sum all the records in the table, or there is a filter?
    >
    > We need more details.
    > --
    > I hope that helped
    > Good Luck
    >
    >
    > "JOM" wrote:
    >
    > > I have 4 tables,
    > > tbl1 has fieldX, filedY and fieldZ
    > > tbl2 has fieldA and fieldB
    > > tbl3 has fieldC
    > > tbl4 has fieldD
    > >
    > > What I want to archieve is as follows
    > > tbl1.fieldX + tbl2.fieldY - tbl3.fieldZ
    > > +tbl2.sum(fieldA)+tbl3.sum(fieldc)=tbl4.fieldD
    > >
    > > part2:
    > > tbl3.fieldC=Avg(tbl4.fieldD)
    > > Please help!
     

Share This Page