update directcustom
set directcustom.telephone = (
	select directtemplate.extension
	from directtemplate
	where directtemplate.recordno = directcustom.recordno
)
where directcustom.recordno in (
	select directtemplate.recordno
	from directtemplate
	where directtemplate.extension between 10000 and 99999
)
