How to add a sum up column to a table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • simonyong
    New Member
    • Jul 2008
    • 28

    How to add a sum up column to a table

    hello, anyone
    thanks to giving me asking question...

    i hav a table where display employee data
    the columns are personnel_numbe r, firstname, lastname, job_title, email and last is Direct_mngr_per sonnel_number
    this direct_mngr_per sonnel_number actually is the personnel number of the person who direct to

    now i hav a query statement to count how many reportee for the person
    statement as below:
    select direct_mngr_per sonnel_number as personnel_numbe r,Count(direct_ mngr_personnel_ number) as total_child from myDataBase group by direct_mngr_per sonnel_number

    My question is:
    i want to add this personnel_numbe r column to the same table which personnel_numbe r is equal to tat person

    izzit tat way correct, or there are better way to do it?
    pls teach me,thx...
  • amitpatel66
    Recognized Expert Top Contributor
    • Mar 2007
    • 2358

    #2
    Your explanation is not that clear. Please provide more details of your requirement if possible with an example

    Comment

    Working...