[編輯:這問題是版本內的一個錯誤的結果3.7.6]碧玉報告:錯誤:操作符不存在日期=布爾
以下PostgreSQL的查詢將返回一個錯誤:
operator does not exist date = boolean.
我不明白爲什麼。這是postgresql代碼給我的錯誤:
select
c.source,
s.name,
s.grouping,
s.kli,
s.term_desc,
(s.population - s.online) as non_hb_pop,
s.online as hb_pop,
s.population as full_pop,
s.rep_date
from
dwh.rpt_cu_private_kli_summary s, dwh.rpt_sgmt_clients c
where
s.partner_id::integer = $P{rpt_cu}
and s.rep_date = $P{rpt_date_beg}
and s.userid=c.userid
group by
c.source, s.term_desc, s.name, s.grouping,
s.population, s.online, s.kli, s.rep_date
order by
s.grouping,
full_pop desc,
s.term_desc;
上面的錯誤信息是什麼意思?
「group by」的用途是什麼?我看不到使用的聚合體。 – wildplasser 2012-02-15 14:48:27
我以前正在使用聚合,然後在沒有除掉GROUP BY的情況下將它們取出。謝謝你指出了我! – precose 2012-02-15 14:54:25
啓用查詢日誌記錄並在PostgreSQL日誌之外的參數替換後執行查詢。發佈。您還需要包含以下顯示參數的日誌行。設置log_statement ='all',重新加載PostgreSQL,重新運行你的查詢,釣魚查詢和params出日誌,並粘貼在這裏。 – 2012-02-21 23:23:39