我有以下我正在尝试运行的查询:
SELECT Script from (
SELECT 9 as ColOrder, ' INSERT INTO PROJ VALUES(' || ID || ',''' || Name || ''', ''' || Version || ''', ''ABCD'', sysdate , ''ABCD'', sysdate);' as Script FROM PROJ where Name like '%[Param.1]%'
union
SELECT 11 as ColOrder,' INSERT INTO PROJMOD VALUES(' || ID || ', ' || ProjID || ', ' || ModID || ', ' || ObjID || ', ''ABCD'', sysdate, ''ABCD'', sysdate);' as Script FROM PROJMOD where ProjID in ( select ID from PROJ where Name like '%[Param.1]%')
) x
Order by ColOrder
但它给了我ORA-12704: character set mismatch error.
当我单独运行两个 select 语句时,它给了我正确的输出,但是当我对两个 select 进行联合时,它给出了 tme 字符集不匹配错误。
这里有什么问题?