G
GrahamR
I am struggling to get the syntax right for an UPDATE query with a SUBSELECT
in MS Access 2003. I am not sure if the SQL is possible either.
I have 2 tables which I am using to temporarily store some values. I want to
update 2 fields of one table with 2 corresponding fields of another table.
Both tables only have a single row and are not related to any other tables (
purely used as a temporary storage area ). The table record that is to
receive the update already has one column with a value in it , which I do not
want to be overwritten, hence wanting to do an UPDATE query.
I thought the basic syntax should be along the lines of
UPDATE TableA SET (fieldA, FieldB)
FROM ( SELECT FieldA, FieldB from TableB).
I have tried various ways of setting the syntax, but just get the usual
'Syntax Error' message which doesn't highlight which particular part of the
syntax is wrong.
I don't seem to be able to find any examples of such syntax in the Help
files or in the text books I own.
in MS Access 2003. I am not sure if the SQL is possible either.
I have 2 tables which I am using to temporarily store some values. I want to
update 2 fields of one table with 2 corresponding fields of another table.
Both tables only have a single row and are not related to any other tables (
purely used as a temporary storage area ). The table record that is to
receive the update already has one column with a value in it , which I do not
want to be overwritten, hence wanting to do an UPDATE query.
I thought the basic syntax should be along the lines of
UPDATE TableA SET (fieldA, FieldB)
FROM ( SELECT FieldA, FieldB from TableB).
I have tried various ways of setting the syntax, but just get the usual
'Syntax Error' message which doesn't highlight which particular part of the
syntax is wrong.
I don't seem to be able to find any examples of such syntax in the Help
files or in the text books I own.