Jump to content

Append Query


Guest jrudolph

Recommended Posts

I am assuming you mean you want to append the columns to the table rather than append the data from one column into another (i.e. concatenating the two). Assuming you do want to add the new columns to the table and all of the contents of those columns, see below.Well, if you are adding columns to the current table, then do that using the ALTER TABLE command.Then at that point there are two options.1. Create a view joining the two tables you are referencing. Example:

CREATE VIEW test (column_names) AS SELECT * FROM table1 JOIN table2 WHERE table1.field1 = table2.field1

Then perform your update on the view.2. Try the query below:

UPDATE   table1   SET    column_name   FROM table1 JOIN table2 ON table1.field1 = table2.field1

You will have to play with these a bit, but they should at least get you started in the right direction.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...