自己参考改一下!C:\Program Files\PostgreSQL\8.3\bin>psql -Uroot -dt_girl -c "select * from test"用户 root 密码: id | username ----+---------- 1 | love 2 | hate (2 笔资料列)
我用的postgres 7 的版本,发现命令执行不了,但在8的版本就可以,提示如下:pc2phone=> select sum((truncate(fcall_time/60)+1)) as call from t_prepaid_history; ERROR: Function 'truncate(int4)' does not exist Unable to identify a function that satisfies the given argument types You may need to add explicit typecasts pc2phone=> select sum(trunc(fcall_time/60)+1) from t_prepaid_history; ERROR: Function 'trunc(int4)' does not exist Unable to identify a function that satisfies the given argument types You may need to add explicit typecasts 请问我应该用哪一个函数来算出这个结果,谢谢.
/usr/local/pgsql/bin/psql -Uroot -ddatabase -c "select sum((truncate(fcall_time/60)+1)) as call from t_prepaid_history"但本身那条语句就执行不到,请问应该用哪个函数,谢谢.
自己参考改一下!C:\Program Files\PostgreSQL\8.3\bin>psql -Uroot -dt_girl -c "select * from test"用户 root 密码:
id | username
----+----------
1 | love
2 | hate
(2 笔资料列)
ERROR: Function 'truncate(int4)' does not exist
Unable to identify a function that satisfies the given argument types
You may need to add explicit typecasts
pc2phone=> select sum(trunc(fcall_time/60)+1) from t_prepaid_history;
ERROR: Function 'trunc(int4)' does not exist
Unable to identify a function that satisfies the given argument types
You may need to add explicit typecasts
请问我应该用哪一个函数来算出这个结果,谢谢.