ORA-00904 (Sybase migrate to ORACLE)
Recently, I used SQL Developper to convert a sybase into Oracle, however, the following problem is encountered:
SYBASE code:
update #temp_result
set chinese_name = ltrim(rtrim(chinese_name)) + big5
from ccc_code
where code = cccode6
Oracle translate above into the following:
MERGE INTO tt_temp_result
USING (SELECT tt_temp_result.ROWID row_id, LTRIM(RTRIM(chinese_name)) || big5 AS chinese_name
FROM ccc_code
WHERE code = cccode6) src
ON ( tt_temp_result.ROWID = src.row_id )
WHEN MATCHED THEN UPDATE SET chinese_name = src.chinese_name;
but it raised ORA-00904 error,
tt_temp_result is a global temporary table: