[sql]
SELECT
CASE
WHEN col_a LIKE ‘%a%’ THEN ‘A’
WHEN col_a LIKE ‘%b%’ THEN ‘B’
ELSE ” END
AS ‘EVENT_TYPE’
FROM table
[/sql]
不挑戰記憶力的技術筆記
[sql]
SELECT
CASE
WHEN col_a LIKE ‘%a%’ THEN ‘A’
WHEN col_a LIKE ‘%b%’ THEN ‘B’
ELSE ” END
AS ‘EVENT_TYPE’
FROM table
[/sql]