I'm migrating a column from one sql table to another with update command. While updating with below query, i get the ORA-01722: invalid number error
. The issue is PID
field in project table has varchar2 datatype and xproject_id in docmeta table has number data type. what options do i have to migrate this data now.
BEGIN
FOR X IN(select projecttype,pid from PROJECT)
loop
update docmeta d
set d.xProjectType=X.projecttype
where d.xproject_id=X.PID
and X.projecttype is not null;
END LOOP;
END;