如何创建一个将多行合并为一个的查询和... [英] How to create a query that combines multiple rows into one and...

查看:86
本文介绍了如何创建一个将多行合并为一个的查询和...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好


我正在尝试创建一个生成交货单的数据库。我有一个链接到数据库的Excel电子表格。从链接的信息我需要能够创建一个交货单。但是在表格中,有多个订单号的实例。


Order_No分行代金券代码

112 44 5

112 44 10

112 44 20

如何创建报告/交货单,以便数据全部排在一行......
< br $>
订购没有分行代金券代码1优惠券代码2 ...

112 44 5 10 20


我真的需要一些建议......我的截止日期是明天:(


提前致谢


Simon

Hi there

I am trying to create a database that generates delivery notes. I have an excel spreadsheet linked to the database. From the linked information I need to be able to create a delivery note. But in the table, there are multiple instances of an order number.

Order_No Branch Voucher Code
112 44 5
112 44 10
112 44 20

How can I create a report/delivery note so the data is all on one row...

Order No Branch Voucher Code 1 Voucher Code 2 ...
112 44 5 10 20


I really need some advice...my deadline is tomorrow :(

Thanks in Advance

Simon

推荐答案

嗨西蒙,


为此我们有一个交叉表查询,它将从凭证中创建列。


但是有一个令人讨厌的副作用,因为列的内容将被更改为列名。如果每个订单没有固定的最大凭证,则很难创建一个港口,因为你不知道要放多少个地方...


你知道最大值吗?


Nic; o )
Hi Simon,

For this we have the cross-table query that will make columns out of the Vouchers.

There''s however a nasty side effect, as the content of the column will be changed into the column name. When you have no fixed max of vouchers per order, it''s hard to create a report, as you won''t know how many fields to place...

Do you know the max ?

Nic;o)


也许如果你在数据库中发布你目前所拥有的内容,人们也许可以看看。

(会使解决方案更快一些看到你有截止日期。)

将数据导入访问权限而不是从excel链接会不会更容易?
Perhaps if you post what you have so far in your DB, people might be able to have a look.
(Would make the solution a lot faster, seeing as you have a deadline.)
Would it not be easier, just to import the data into access, rather than link from excel?


嗨伙计们


每张送货单的最大凭证类型数量为5.


如何将文件上传到此论坛?不幸的是我是新来的


提前致谢
Hi guys

Maximum number of voucher types per delivery note is 5.

How do I upload files to this forum? I am new to this unfortunately

Thanks in advance


这篇关于如何创建一个将多行合并为一个的查询和...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆