MySQL General List,

 Server specifications:
 MySQL 4.1.3-beta, phpMyAdmin 2.5.7-pl1, PHP 4.3.8
 My specifications:
 MySQL beginner, PHP intermediate, HTML and CSS advanced.

 The situation:
I have two tables, one old, and one new. In both tables I have a column called "active", which is either 0 or 1, to denote whether a user is to receive email or not. I am migrating all the data from the old table to the new. I want to make sure that the "active" column is identical, so I simply want to copy the fields from the old table to the new, overwriting what may exist in the new. I want to match the fields by using the member ID, called "id" in the old table and "MEMBER_ID" in the new.

 This is the statement I thought would work.
UPDATE forum_members( active ) SELECT active
FROM members
WHERE forum_members.MEMBER_ID = members.id

 But MySQL tells me:
 |You have an error in your SQL syntax|

 The Questions:
 What do I need to do to correct the syntax of the statement?

  What I've done so far:
I have looked at the online MySQL manual for the correct syntax for INSERT and UPDATE. But despite reading them, I'm still not sure which I want to be using, and how.

 Any assistance is much appreciated. Thank you.

Dave


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to