Newbie: Update records correctly?

  • Thread starter Thread starter John Graham
  • Start date Start date
J

John Graham

I'm struggling with an update that I have, I'm trying to update a
query in access that I have written and for some reason it's only
updating the first record. I thought I understood the process, but it
doesn't seem to be working. What I have so far is:

UPDATE [qrytblScholarshipAwardAppJoin2006-07] LEFT JOIN OracleDB ON
[qrytblScholarshipAwardAppJoin2006-07].CampusID =
OracleDB.OracleTbl.CAMPUS_ID SET
[qrytblScholarshipAwardAppJoin2006-07].fldUSCitizen =
OracleDB.OracleTbl.CITIZEN_IND,
[qrytblScholarshipAwardAppJoin2006-07].fldDateMod = Now();


Isn't this the correct premise? Join the two off of a key, then do a
set command for the column you want updated? You'll notice I'm
updating a second column with the current time, mostly for auditing.

John
 
Got it. I think the problem was I was joining a query to a table,
since it was a join I went ahead and joined to the original table and
Wah La.

UPDATE [a] INNER JOIN b ON [a].CampusID = b.CAMPUS_ID SET
[a].fldUSCitizen = b.CITIZEN_IND, [a].fldDateMod = Now();
 
Back
Top