If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > write to 1 table, subtract from another

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-07-04, 08:48
stahly stahly is offline
Registered User
 
Join Date: Feb 2004
Posts: 11
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 09:12. Reason: word confusion
Reply With Quote
  #2 (permalink)  
Old 09-07-04, 11:24
Seppuku Seppuku is offline
Useless...
 
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.
Reply With Quote
  #3 (permalink)  
Old 09-07-04, 19:12
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
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.
Reply With Quote
  #4 (permalink)  
Old 09-07-04, 20:41
stahly stahly is offline
Registered User
 
Join Date: Feb 2004
Posts: 11
its an access database, but frontpage & sql queries are used to "access" the data...
Reply With Quote
  #5 (permalink)  
Old 09-07-04, 20:56
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
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...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On