结果集必须分组 - MYSQL

Result set must be in groupings - MYSQL

我正在使用 java 代码制作报告,它工作正常 (Image Right)。 现在我想把它转换成 BIRT。

由于 BIRT 专注于查询,我必须将我的 java 代码更改为普通查询。问题是,我在 java 查询上有一个 for each 循环,而 mysql 没有。 我在 here 中发现了类似的查询,但它对我不起作用。

截至目前,使用普通查询这是我的结果: BIRT RESULT

我在这里错过了什么?这是我的代码。

SELECT item.No_, item.Description, item_ledger_entry.Item_No_,
item_ledger_entry.Description,item_ledger_entry.Posting_Date,
item_ledger_entry.External_Document_No_, item_ledger_entry.Document_No_,
item_ledger_entry.Location_Code, item_ledger_entry.Quantity,
item_ledger_entry.Entry_Type 
FROM pbsdev3.item, pbsdev3.item_ledger_entry
where item.No_ = item_ledger_entry.Item_No_
and item.Description = item_ledger_entry.Description
group by item.No_;

我是一个非常新的编码员,所以我还没有太多知识。

我想要的结果是这样的(It must be this) 这是 item Table and the item_ledger_entry 非常感谢帮助!

实际上,您的查询很好用。确保您使用的是 Table 而不是网格。 Table 在涉及多个数据时优于网格。 顺便说一句,你不需要那个分组。