【发布时间】:2021-06-23 09:10:31
【问题描述】:
我尝试运行以下查询:
SELECT account_no, month_id, IF (product_category = 'Services', 'ServicesMarketing', product_category) AS product_category, revenue
FROM public.revenue_raw_data
我得到的错误:
ERROR: function if(boolean, unknown, character) does not exist LINE 1: SELECT account_no, month_id, IF (product_category = 'Service... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. SQL state: 42883 Character: 30
我的数据:
【问题讨论】:
标签: sql postgresql case