我有一个这样的 SQL 语句:
SELECT QUOTE_CREATION.*,
CASE
WHEN (SUBSTR (QUOTE_CREATION."PO_number", 1, 3)) = 'ARA'
THEN
'TE161938'
WHEN (SUBSTR (QUOTE_CREATION."PO_number", 1, 3)) = 'HH-'
THEN
'TE161302'
WHEN (SUBSTR (QUOTE_CREATION."PO_number", 1, 3)) = 'SMT'
THEN
'TE161101'
WHEN (SUBSTR (QUOTE_CREATION."PO_number", 1, 3)) = 'AYP'
THEN
'TE108812'
WHEN (SUBSTR (QUOTE_CREATION."PO_number", 1, 3)) = 'DKR'
THEN
'TE160895'
ELSE
QUOTE_CREATION."Created_By"
END
AS CORRECT_USER_ID
FROM CCO.QUOTE_CREATION QUOTE_CREATION
但是,当我尝试运行查询时,我在 CASE 表达式的“ELSE”部分收到错误“字符集不匹配”。有人可以建议我在哪里做错了吗?
谢谢桑托莎