Reply to Update query from another table on datechanged field

Your name:

Reply:


Posted by scoots987 on 11/26/07 02:19

Hi all, sorry if this is the wrong place to put this.

I have two tables, both contain address info. I would like to update
address1, address2, city, state, zipcode and country. May be a few
other fields.

The table I am comparing to has many duplicates. The linkage between
the two table is by ssn. However I have one field that is date stamped
as to which is the most current.

How do I get the last date stamped record and update the other table?

update group1 set
address1 = c.address1
address2 = c.address2
city = c.city
state = c.state
zipcode = c.zipcode
country = c.country
from main c, group1 g
where g.ssn = c.ssn and max(lastchanged)

I know the above does not work but it is what I am try to do. Can
anyone help?

TIA!!!!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация