SQL 2000 Help - two tables and how to get count from 1st into 2nd

Discussion in 'Software' started by jwalker67, Sep 23, 2007.

  1. jwalker67

    jwalker67 Private E-2

    First things first... I HAVE LITTLE TO NO DB KNOWLEDGE so I am looking for complete help and not code snippets. PLEASE.

    I have a table that contains categories with a total item count field, working field and not working field.

    The second table has the items that belong to the category table with a working field and not working field.

    What I need to do:
    Get a count of all the items that belong to Category A
    Get a count of items for Cat A that are "working"
    Get a count of items for Cat A that are "not working"

    I need to know how I can update the related fields in the Category table when a new item is added or when an item is updated...ie changed from working to not working or vice versa.

    I hope this makes sense and that someone can help.

    ALL HELP is greatly appreciated.
     
  2. baklogic

    baklogic The Tinkerer

    My visual basic is probably worse than yours.
    When I wanted to get different values for a cell , I used the 'IF' EQUATIONS.

    For example, If =IF(AND(D110<=TODAY()-30),TRUE,FALSE)
    IF(AND(D89<=TODAY()-60),TRUE,FALSE)
    IF(AND(R13<=91),0,R13-91)
    These give alternative values for a given cell-- i.e TRUE, OR FALSE IF GREATER THAN....
    I worked with these basic equations, and juggled to suit the answer I needed, in another cell.
    The IF Function, has a test abilty to see if your equation works, so that you can keep adjusting , until you get the answer you need.
    Perhaps if you play with the equations in the If module, you can work out a way.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds