off the top of my head, may have errors..

update contributors c
set c.namesort = ( select cs.namesort
from contributor_sort cs
where c.name = cs.name)


On 6/3/06, Jim McAtee <[EMAIL PROTECTED]> wrote:
> Using MySQL 5.0.21, I have two tables:
>
> contributors
> -----------------
> contributor_id
> name
> namesort
>
> contributor_sort
> -----------------
> name
> namesort
>
> I'd like to update the namesort column in contributors by using the values
> in the namesort column in contributor_sort wherever name = name.  I don't
> have the id in the second table, only the name.  Also, the
> contributor_sort table may not have matches for all rows in the
> contributors table.
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242293
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to