當我在PostgreSQL中執行MySQL查詢它顯示。我已經在谷歌搜索有關該錯誤的錯誤,但他們沒有工作me.Please建議我來解決。如何更改MySQL查詢到PostgreSQL查詢
下面是MySQL查詢:
SELECT caller_id_number,
caller_id_name,
dialed_number,
count(*) NumberOfCalls,
round(sum(duration_seconds)/60,2) CallDurationMin
FROM kazoo_cdr_rpt
WHERE cdr_date_time > '20-08-2017'
AND cdr_date_time < 24-08-2017
AND length(caller_id_number) < 5
AND direction = "outbound"
GROUP BY dialed_number;
,當我在Postgres的執行上面的查詢是得到錯誤的
round(sum(durati... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
什麼是您的具體問題? Postgre不是MySQL,所以你不能期望工作。錯誤消息告訴你爲什麼:你正在使用的函數沒有在Postgre中定義,所以檢查你的MySQL函數Postgre是什麼。 – datell
你能提出什麼是圓使用PostgreSQL中工作的功能(總和(DURATION_SECONDS)/ 60,2) –
你的錯誤看起來很奇怪 - 能否請您複製/粘貼異常的全部文本.. –