Well have spent too much time on a non-issue, but with a few spare moments of personal time have thrown together the query for you. The following show format first, middle, and last name correctly from the Name field in the _users table. Please be sure to backup your database!
[code:1]
UPDATE `jos_comprofiler` AS cb
LEFT JOIN `jos_users` AS j
ON j.`id` = cb.`user_id`
SET
cb.`firstname` = TRIM( SUBSTRING_INDEX( j.`name`, ' ', 1 ) ),
cb.`middlename` = TRIM( REPLACE( REPLACE( j.`name`, SUBSTRING_INDEX( j.`name`, ' ', 1 ), '' ), SUBSTRING_INDEX( j.`name`, ' ', -1 ), '' ) ),
cb.`lastname` = TRIM( SUBSTRING_INDEX( j.`name`, ' ', -1 ) )
[/code:1]
To test if the above will properly display, please run the below test query. The below query is just a select so no damage can come of it and will give you a preview of the above queries results.
[code:1]
SELECT
TRIM( SUBSTRING_INDEX( `name`, ' ', 1 ) ) AS 'first_name',
TRIM( REPLACE( REPLACE( `name`, SUBSTRING_INDEX( `name`, ' ', 1 ), '' ), SUBSTRING_INDEX( `name`, ' ', -1 ), '' ) ) AS 'middle_name',
TRIM( SUBSTRING_INDEX( `name`, ' ', -1 ) ) AS 'last_name'
FROM `jos_users`
[/code:1]