我想知道如何在函数类型日期输入参数,因为在执行此操作时,会出现以下错误
report_soat(日期,日期)
未定义的函数:7错误:运算符不存在:日期> =字符变化第6行:BETWEEN fecha_in和fecha_out ^提示:没有运算符匹配给定的名称和参数类型。您可能需要添加显式类型转换。 QUERY:SELECT soats.status AS" estado",soats.placa AS" placa" FROM soats soats.task_id IS NOT NULL和date(soats.created)BETWEEN fecha_in和fecha_out语境:PL / pgSQL函数report_soat(字符变化,字符变化)第2行在RETURN QUERY
SELECT
soats.status AS "estado",
soats.placa AS "placa"
FROM soats
where soats.task_id IS NOT NULL and date(soats.created)
BETWEEN start_date AND end_date;
IN start_date date,IN end_date date,OUT status varchar,OUT placa VARCHAR
答案 0 :(得分:0)
...试
report_soat('2017-11-14'::date, '2017-11-14'::date)