I have a table in access 2007 "Table1". I want to add new columns in "Table1" and want to update values in these columns from another table "Table2". Is there any way to design a single query to do these two tasks?
I have a table in access 2007 "Table1". I want to add new columns in "Table1" and want to update values in these columns from another table "Table2". Is there any way to design a single query to do these two tasks?
No. Must first ALTER the table then run UPDATE to populate the new fields.
Why do you need to add fields? Is this a periodic event? If so, sounds like data structure might not be optimal.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thanks for the reply. I have to add fields bcoz while creating new table through make table query some fields may not be defined as they don't have any default values. The values for these fields are to be updated from other table after creating the first table. If I define these fields while creating the table as null, the data type appears as binary. Thereafter if I update these fields from other table, unexpected data appears in these fields.
Why do you need to create table by query?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.