列和记录合并问题。 [英] Column and record consolidation problem.

查看:67
本文介绍了列和记录合并问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

列合并。


我的问题是这个。我必须将旧表中的每个def1-def23列从新表中排序到def1-def6列,保留记录中的其他数据。所以基本上,我有23个类别,我必须分为6个更广泛或更一般的类别。


我尝试在查询设计视图中更新/附加数据,但我最终由于我缺乏知识,每次都会出现语法错误。下面是旧表和新表的示例。


旧/当前表格格式:

1. photonum text

2. streetnum text

3.街道名称文字

4.更新日期

5.前面是/否

7.左边是/否

8.后方是/否

9. def1是/否

10. def2是/否

11. def3是/否

12 def4是/否

13 def5是/否

.. .....

31. def23是/否

32.底部是/否

33.中间是/否

34. top yes / no


新表:

1. photonum text

2. streetnum text

3.街道名称文字

4.更新日期

5.前面是/否

6.正确是/否

7.左是/否

8.后方是/否

9. def1是/否

10. def2是/否

11. def3是/否

12 def4是/否

13 def5是/否

14. def6是/否

15.底部是/否

16.中间是/否

17.顶部是/否


在同一枚硬币上:
记录合并


在同样的表格中,我将如何以这种方式整合记录?


所以这个:

photo streetnum streetname def1 def2 def3 def4 def5

1.jpg 123 maple true true false false false

2.jpg 123 maple false true true false false

3 .jpg 123 maple true false false false true

可以成为这个:

photo streetnum streetname def1 def2 def3 def def5

moot 123 maple true true true false true >

请指出正确的方向,任何帮助都将受到赞赏。

大约有35,000条记录,排除了及时手工完成。



谢谢

Column Consolidation.

My problem is this. I have to sort each of the def1-def23 columns from the old table into the def1-def6 columns from the new table preserving the other data in the records. So basically, i have 23 categories that I have to sort into 6 broader or more general categories.

I have tried updating/appending the data in the query design view, but I end up with syntactic errors every time due to my lack of knowledge. Below is a sample of the old table and the new table.

Old/current table format:
1. photonum text
2. streetnum text
3. streetname text
4. insdate date
5. front yes/no
6. right yes/no
7. left yes/no
8. rear yes/no
9. def1 yes/no
10. def2 yes/no
11. def3 yes/no
12 def4 yes/no
13 def5 yes/no
.......
31. def23 yes/no
32. bottom yes/no
33. middle yes/no
34. top yes/no

new table:
1. photonum text
2. streetnum text
3. streetname text
4. insdate date
5. front yes/no
6. right yes/no
7. left yes/no
8. rear yes/no
9. def1 yes/no
10. def2 yes/no
11. def3 yes/no
12 def4 yes/no
13 def5 yes/no
14. def6 yes/no
15. bottom yes/no
16. middle yes/no
17. top yes/no


On the same coin:
Record Consolidation

In those same tables, how would I go about consolidating records in this fashion?

so this:
photo streetnum streetname def1 def2 def3 def4 def5
1.jpg 123 maple true true false false false
2.jpg 123 maple false true true false false
3.jpg 123 maple true false false false true

can become this:
photo streetnum streetname def1 def2 def3 def def5
moot 123 maple true true true false true

Please point me in the right direction, any help would be appreciated.
There are roughly 35,000 records, which rules out doing it by hand in a timely manner.


Thank You

推荐答案

你还没有说过如何将23个旧类别合并到新的。你有6个新类别,但没有关于什么去哪里的信息。
You haven''t said anything about how the 23 old categories are merged into the new ones. You have 6 new categories but no information as to what goes where.



你还没有说过23个旧类别怎么样被合并到新的。你有6个新的类别,但没有关于什么去哪里的信息。
You haven''t said anything about how the 23 old categories are merged into the new ones. You have 6 new categories but no information as to what goes where.



这很简单。


def1得到数字2,4,5,12,21,22和23

def2只获得3号

def3获得数字1

def4获得数字6,9,10,11,13,15,16和17

def5获得数字19

def6获得数字7,8,14和20


谢谢。

That is simple enough.

def1 gets numbers 2,4,5,12, 21, 22 and 23
def2 gets just number 3
def3 gets just number 1
def4 gets numbers 6,9,10,11,13,15,16 and 17
def5 gets number 19
def6 gets numbers 7,8,14 and 20

Thank you.


简单就是在问题中找到相关信息;)


不幸的是,如果我正在读你正确写的东西,那么你也省略了解释你的整合应该如何运作。似乎一组旧记录被写成一个新的记录。也许你可以解释一下这在你的场景中应该如何工作?
Simple would be finding the relevant information in the question ;)

Unfortunately, if I''m reading what you have written correctly, then you have also omitted to explain how your consolidation should work. It seems that a group of the old records get written as a single new one. Perhaps you could explain how this should work in your scenario?


这篇关于列和记录合并问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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