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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
double check an update query
I have a question about this update query before I run it:
UPDATE 2007_SUBMISSIONS INNER JOIN 2007_SUBMISSION_HISTORY ON [2007_SUBMISSIONS].MEMBID = [2007_SUBMISSION_HISTORY].MembID SET [2007_SUBMISSION_HISTORY].AMT_PAID = Round([2007_SUBMISSIONS].AMT_PAID, 2), [2007_SUBMISSION_HISTORY].SUB_TYPE = "update", [2007_SUBMISSION_HISTORY].SUB_DATE = Date(), [2007_SUBMISSION_HISTORY].AMT_SUBMITTED = Round([2007_SUBMISSIONS].AMT_PAID-[2007_SUBMISSION_HISTORY].AMT_PAID, 2) WHERE ((([2007_SUBMISSIONS].MEMBID) Not In (SELECT [MEMBID] FROM [2007_I_04e_UPDATE_SUBMISSION_MEMBERS_Filter]))); What I think this query does is if a member is in the submission history table and also not in the filter (assumption it is in submission table) then it changes the amt_paid in the submissions history table = amt_paid in submissions - amt_paid in submissions history and it adds the submission date of today and it rounds it before it subtracts. Is that right? thanks, |
Thread Tools | |
Display Modes | |
|
|