Help needed with update query

nick2price

Registered User.
Local time
Today, 03:26
Joined
Sep 24, 2008
Messages
14
I have two tables which are linked. To search for records i currently have the query (ignore the extras, this is done through java so the query looks a bit different)
Code:
"select r.result, c.Nationality, c.First_Name, c.Last_Name " +
    "FROM (((tblResults as r " +
                   "WHERE e.Event_Name = ? " +
            "AND r.Round_ID = ? ";

So this query returns everything i need from these two tables. Now i want to update both of these tables with a whole new set of data. So would i keep the query simular.
I am trying somthing like
Code:
UPDATE tblCompetitor, tblResults
SET r.result, c.Nationality, c.First_Name, c.Last_Name
 inner join tblCompetitor as c on r.Competitor_ID=c.ID) 
            inner join tblEvent e on r.Event_ID=e.ID) 
            inner join tblRound ro on r.Round_ID=ro.ID) 
WHERE e.Event_Name = ? 
AND r.Round_ID = ?
Is this above looking how it should do with an update statement? Or how would i do somthing like this.
 

Users who are viewing this thread

Back
Top Bottom