how to get the sum of the fields ...Very URGENT

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arunatata
    New Member
    • Feb 2007
    • 1

    how to get the sum of the fields ...Very URGENT

    hi .. iam having a table with six fields which is holding some values.
    there are two branches for a company. now they want to see the two branches values at once . that is sum of the stockin,
    sum of the stock out etc...

    my table is here...
    stockin
    stockout
    stockinhand
    openingstock
    unitrate
    value.

    Now i want to get the sum of these two branches
  • satane
    New Member
    • Jun 2007
    • 4

    #2
    hi,

    in ur table there is no feilds to specify the branch like branch id like that.
    if there is baranch id then the query is like this......

    select sum(stockin) as stockinn,sum(st ockout) as stockoutt from stack where branchid=1


    othere wise can u send me how u identify two differnt branches.

    Comment

    Working...