select concat('update DISTRIBUTED_TESTS set DISTRIBUTED_TESTS.KEY_ONLINE_TEST = ', EVALUATION.ID_INTERNAL, ' where DISTRIBUTED_TESTS.ID_INTERNAL = ', EVALUATION.KEY_DISTRIBUTED_TEST, ';') as "" from EVALUATION where EVALUATION.KEY_DISTRIBUTED_TEST is not null;