Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Posts
    11

    Unanswered: write to 1 table, subtract from another ????

    not sure if this is possible in ASP & frontpage, but this is what i have and need to do.

    1. read data from table1: quantity
    2. write data to table2: ordered

    3. calculate new number: quantity = quantity - ordered

    4. write new data to table1: quantity

    if anyone can help me out with this or point me in the right direction i would greatly appreciate this.

    Stahly
    Last edited by stahly; 09-07-04 at 10:12. Reason: word confusion

  2. #2
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    You could probably do this in one or two SQL queries, so I'd start there... post in the SQL forum and they can probably assist you better then we could...
    That which does not kill me postpones the inevitable.

  3. #3
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    What sort of DB are you using? If it's MS SQL a stored proc would take care of this nicely... if it is MS Access you are probably going to have to submit multiple queries to the database to get your desired result.

  4. #4
    Join Date
    Feb 2004
    Posts
    11
    its an access database, but frontpage & sql queries are used to "access" the data...

  5. #5
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    Right. you will need to run multiple queries... one for step 1, 2 and 4. You will have to build the rest of the logic surrounding these into your asp...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •