【发布时间】:2019-04-30 05:28:38
【问题描述】:
我正在使用 FIND_IN_SET 并出现以下错误
SQL 错误 [42883]:错误:函数 find_in_set(unknown, character varying[]) 不存在
提示:没有函数匹配给定的名称和参数类型。您可能需要添加显式类型转换。
我使用了下面的例子
where FIND_IN_SET ('US', country_codes) and
where FIND_IN_SET ('"US"', country_codes)
表格如下
COUNTRY_CODES
{US, CA}
{US, CA, UT}
{FR, BG, ET}
and want to use for group by country_codes where as it should consider COUNTRY_CODES
{US, CA}
{US, CA, UT} as same country as it is coming in the query
where as group by consider it as different country
【问题讨论】:
-
country_codes变量在哪里定义? -
你在哪里找到in the Postgres manual
find_in_set()?
标签: sql postgresql