Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UpDate Query Syntex Help 1

Status
Not open for further replies.

PLK3541

IS-IT--Management
Mar 29, 2005
60
US
I am trying to write an update query and I am having problems with
a query must have at least one destination field error.

This query involves 2 tables (RECORD & PROJECT) that have matching fields, but the ‘RECORD’ table has an added field ‘jobDes’ and the column is null. I need to update the data from the another table

I want to match up the associated Fields then update the data from the one table
to the second table

An example of the code I used in Access is as follows:

UPDATE Record
SET Record.jobDes =(SELECT Project.jobDes FROM Project
WHERE Record.jobno = Project.jobno),




I am not sure about the syntax, any help is appreciated

Thanks

Pat
 
Something like this ?
UPDATE Record INNER JOIN Project ON Record.jobno = Project.jobno
SET Record.jobDes = Project.jobDes
WHERE Record.jobDes Is Null;

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I just gave you a star because this helped me figure out a problem I was having. Thanks for the code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top