0

我有一个用于 postgres 的过滤器

AND to_char(eat.datecreated, 'HH12:MI:SS AM') BETWEEN
  to_char('06:00:00', 'HH12:MI:SS AM') AND to_char('06:00:00', 'HH12:MI:SS AM')  

结果:

ERROR:  function to_char(unknown, unknown) is not unique
LINE 25: ...to_char(eat.datecreated, 'HH12:MI:SS AM') BETWEEN to_char('0...
                                                          ^
HINT:  Could not choose a best candidate function. You might need to add explicit type casts.

********** Error **********

ERROR: function to_char(unknown, unknown) is not unique
SQL state: 42725
Hint: Could not choose a best candidate function. You might need to add explicit type casts.
Character: 1455

请帮我。我被这个查询困住了。

4

1 回答 1

1
and eat.datecreated::time between '06:00:00'::time and '18:00:00'::time
于 2013-02-11T08:56:09.917 回答