如何将多行和多列的数据添加到一个字符串中 [英] How to add data from multiple rows and columns into one string

查看:53
本文介绍了如何将多行和多列的数据添加到一个字符串中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

这是我第一次参加这个论坛,而且我很熟悉Access。所以,请提前感谢您的耐心:)

我正在使用Access 2007.

我有一个包含4种不同信息的表,我需要在同一个组织它们字符串,但我不确定我是应该用查询还是直接在报告中。

我正在做的是对植物的研究,所以我在研究数量上的第一个信息。我能找到4种植物,这是第二种信息,它们的名字和我发现的数量将是第3和第4条信息。

最后我有一份报告研究,在那里我需要一个植物清单(当它们存在时)如下:

(类型) - (名称)(定量); (姓名)(quant。);(姓名)(quant。); ....


research____type_____name_____quant。

1___________1________rose______10

1___________2________cactus____10

1___________2________beans_____10

2___________ ________ ______

3___________1________rose______30

4___________3________lily______40



research 01 1 - rose(10); 2 - 仙人掌(10);豆(10);


研究02

研究03 1 - 玫瑰(30);


research 04 3 - lily(40);


如何将多行和多列的数据发送到一个字符串保留这个结构,并留下那些没有任何信息的空白?


希望我正确解释,并提前感谢,

亲切的问候, $ b $bJéssica

解决方案

多个类型出现在同一行或每个类型有一个单独的行,就像 Research


报告需要多个[键入]在同一行。我得到的最接近的[Type]是这样重复的:

research 01 1 - rose(10); 2 - 仙人掌(10); 2 -beans(10)

是否有可能避免它,结束如下:

research 01 1 - rose(10); 2 - 仙人掌(10); bean(10)

感谢您的关注!


我想构建2个不同的查询,在处理报表时会更灵活。

但是你知道它是否可能,我怎么能这样做:


查询1

研究____类型_____()

1___________1________rose(10)

1___________2________cactus(10);豆类(10)

2___________ ________ ______

3___________1________rose(30)

4___________3________lily(40)


查询2

研究____()

1___________ -rose(10); 2仙人掌(10);豆子(10)

2___________ _

3 ___________ 1-rose(30)

4 ___________ 3-lily(40)

Hi guys!
This is my first time at this forum, and I am begginer with Access. So, thank you in advance for your patience :)
I am using Access 2007.
I have a table with 4 different informations and I need to organize them in the same string, but I am not sure if I should do it with a query or directly in the report.
What I am doing is a research with plants, so my first information in the number of the research. And I am able to find 4 kinds of plants, this is the second information, and their names and how many I found will be the 3th and 4th information.
At the end I have a report for each research, and there I need a list of the plants (when they exist) like this:
(type) - (name) (quant.); (name) (quant.);(name) (quant.);....

research____type_____name_____quant.
1___________1________rose______10
1___________2________cactus____10
1___________2________beans_____10
2___________ ________ ______
3___________1________rose______30
4___________3________lily______40


research 01 1 - rose(10); 2 - cactus(10); beans(10);

research 02

research 03 1 - rose(30);

research 04 3 - lily(40);


How can I send this data from multiple rows and columns into one string keeping this structure, and left blank those without any information?

Hope I was explaining properly, and thanks in advance,
Kind regards,
Jéssica

解决方案

Do multiple Types occur on the same line or does each Type have a separate line just like Research?


The report needs the multiple [Type] in the same line. The closest I got [Type] was repeting like this:
research 01 1 - rose(10); 2 - cactus(10); 2 -beans(10)
Is it possible to avoid it, ending like this:
research 01 1 - rose(10); 2 - cactus(10); beans(10)
Thank you for your attention!


I thought building 2 different queries, it would give more flexibility when working with reports.
But do you know if it is possible, and how could I do this:

Query1
research____type_____()
1___________1________rose (10)
1___________2________cactus (10);beans(10)
2___________ ________ ______
3___________1________rose (30)
4___________3________lily (40)

Query2
research____()
1___________1 -rose (10); 2 -cactus (10);beans(10)
2___________ _
3___________1-rose (30)
4___________3-lily (40)


这篇关于如何将多行和多列的数据添加到一个字符串中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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