I have a table with a date value that I need to update with a value from another table. The table I want to update is profile. The profile table is linked to the study table with the foreign key StudyID.

the profile table has the date I want to update to the value in the date value in the study table.

So I can do a simple select like this....

SELECT ProfileID, p.`Date` as `BadDate`, s.`Date` as `GoodDate`
FROM profile JOIN study USING (`StudyID`)


Of course study to profile is a one to many relationship. How do I run an update to set p.`Date` equal to s.`Date`?

Chris W

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to