【发布时间】:2018-01-09 21:50:48
【问题描述】:
我正在尝试从 node.js 运行复杂的 cassandra sql,并为其使用 cassandra express 包,下面是查询:
client.execute("select distinct c.objekt PSP, b.bestellung purchase_order, b.details, b.bestellnettowert Budget, c.Interim_Amounts, c.belegdatum, b.cost_centre
from
(select objekt, sum("Wert/KWahr") Interim_Amounts, belegdatum, bestellung from bdr.cj74 where year(belegdatum) = '2016' group by objekt, belegdatum, bestellung) c,
(select bestellung, "Lieferant/Lieferwerk" details, bestellnettowert, belegdatum, "PSP-Elm", "Kostenst." cost_centre from bdr.opexcapex where year(opexcapex.belegdatum) = '2016') b
where b."PSP-Elm" = c.objekt
and year(c.belegdatum) = year(b.belegdatum)
and c.bestellung = b.bestellung", [],
function(err, result) {
如果我运行简单的选择语句,它就可以工作,任何帮助都会很棒!
【问题讨论】:
标签: node.js express cassandra cql