订单和订单详细信息查询问题

订单和订单详细信息查询问题

本文介绍了订单和订单详细信息查询问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我使用Northwind作为基础创建了一个数据库。它用于创建采购订单并分析给定时期内各种机器的成本。

我的订单与Northwind非常相似 - 它有一个Order Details子表单。我最近在订单表单中添加了一个运输成本字段。 (每个单独的订单仅适用于一台机器)。我的采购订单报告打印完美(类似于NW中的发票报告)。问题出在我尝试打印工厂成本报告时。此报告计算在两个指定日期之间为机器购买的所有商品。在我添加运输成本字段之前一切正常。如果订单18中有四个项目,例如机器3,那么这三个产品及其成本将被发送到报告中。出现问题是因为运输成本会增加三倍 - 每个订单明细都会占用全部运输成本。有没有办法强制我的查询只采取运输成本的第一个实例。


绝对非常感谢任何帮助!


保罗。


PS:我只是使用Design View查询 - 只需勾选框即可。标准会很好。


再次感谢。

I have created a database, using Northwind as a foundation. It is used to create purchase orders and analyse costs of various machines for a given period.
My order form is very similar to that in Northwind - it has an Order Details subform. Ihave recently added a Transport Costs field to the Order form. (Each separate Order is for one machine only). My Purchase Order report prints perfectly (akin to the Invoice report in NW). The problem lies when I try to print my Plant Costs report. This report calculates all of the items that were bought for a machine between two specified dates. It was fine until I added the Transport Costs field. Should there be four items on Order 18, say, for Machine 3, then these three products and their costs are sent to the report. Problems arise because the Transport Costs are then trebled - each Order Detail takes on the full Transport Cost. Is there any way of forcing my query to take the first instance of the Transport Costs only.

Any help is absolutely gratefully accepted!

Paul.

PS: I am just using a Design View query - just ticking the boxes. Criteria would be nice.

Thanks again.

推荐答案



抱歉保罗,我们不得不看到这个查询。在设计视图中,您可以将视图更改为SQL并在此处复制和粘贴代码。


Mary

Sorry Paul I''m afraid we''ll have to see the query. In Design view can you change the view to SQL and copy and paste the code here.

Mary


展开 | 选择 | Wrap | 行号



这篇关于订单和订单详细信息查询问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 11:43