格式化前:
SELECT
FROM t
WHERE
CASE WHEN comp_cd = '0593' THEN 'USD'
WHEN comp_cd = '0594' THEN 'USD'
WHEN comp_cd = '1601' THEN 'CNY'
WHEN comp_cd = '1602' THEN 'CNY' END = t.cy_cd
格式化后:
SELECT
FROM t
WHERE CASE WHEN comp_cd = '0593' THEN 'USD' WHEN comp_cd = '0594' THEN 'USD' WHEN comp_cd = '1601' THEN 'CNY' WHEN comp_cd = '1602' THEN 'CNY' END = t.cy_cd
格式化前: SELECT FROM t WHERE CASE WHEN comp_cd = '0593' THEN 'USD' WHEN comp_cd = '0594' THEN 'USD' WHEN comp_cd = '1601' THEN 'CNY' WHEN comp_cd = '1602' THEN 'CNY' END = t.cy_cd 格式化后: SELECT FROM t WHERE CASE WHEN comp_cd = '0593' THEN 'USD' WHEN comp_cd = '0594' THEN 'USD' WHEN comp_cd = '1601' THEN 'CNY' WHEN comp_cd = '1602' THEN 'CNY' END = t.cy_cd