avatar
small problem about DAO# Database - 数据库
l*i
1
各位有什么推荐? 上次我记得哪位神人在花盆里种了棵枣树,也硕果累累的
avatar
l*n
2
a table(15k records) with codes to indicate state. now I have to compare it
with another table, so need to convert all state codes to state
abbreviations.
any quick way to do it? thanks
avatar
g*o
3
肯定可以了,等山农给你推荐吧,她很多果树都始终在盆里的,全都硕果累累

【在 l****i 的大作中提到】
: 各位有什么推荐? 上次我记得哪位神人在花盆里种了棵枣树,也硕果累累的
avatar
x*y
4
any quick way to do it?
avatar
A*r
5
山农真的是她不是他?

【在 g*********o 的大作中提到】
: 肯定可以了,等山农给你推荐吧,她很多果树都始终在盆里的,全都硕果累累
avatar
l*n
6
My case is a little complicated
because in some data, the state code is abbreviation. So it is mixed up,like
08 CA 21
99 TX LA NY 01
BTW, another question is if one column is Yes/No, how to count the number of
Yes?
Thanks

【在 x****y 的大作中提到】
: any quick way to do it?
avatar
g*o
7
没人知道,逮着哪个算哪个

【在 A*******r 的大作中提到】
: 山农真的是她不是他?
avatar
B*g
8
不明白。

like
of

【在 l******n 的大作中提到】
: My case is a little complicated
: because in some data, the state code is abbreviation. So it is mixed up,like
: 08 CA 21
: 99 TX LA NY 01
: BTW, another question is if one column is Yes/No, how to count the number of
: Yes?
: Thanks

avatar
g*5
9
直径两尺半? 那么大?
30英寸的花盆, 很多果树都可以种了. 桔子, 无花果, 枣树, 水梨, 桃子, 柿子, 葡
萄等等都可以. 当然了, 盆栽果树, 修枝的功夫就比较重要了. 如果有, 尽量选dwarf
或semi-dwarf的品种.
avatar
l*n
10
OK, Beijing
This is my problem.
Table 1 has Year, STATES, Event. STATES may contain many states and use abv,
event contains many events
Table 2 has Year, STATE1, STATE2,..., STATE7, Event1,...,Event10. But STATE1
is using abv, but STATE2 use code, which has to use table 3 to know the abv
. Each state1(to 7) only contains 1 state or nothing.
Table 3 is Statecode, State.
now I want to know how the relationship between table 1 and table 3.
I want to know in year 2008 and 2007, in each state how man

【在 B*****g 的大作中提到】
: 不明白。
:
: like
: of

avatar
n*6
11
Is it for production? Or just for your research?
If it is just for your research, change the full state name to abv and put
them in a temp table might be a way with clear logic for later process.

abv,
STATE1
abv

【在 l******n 的大作中提到】
: OK, Beijing
: This is my problem.
: Table 1 has Year, STATES, Event. STATES may contain many states and use abv,
: event contains many events
: Table 2 has Year, STATE1, STATE2,..., STATE7, Event1,...,Event10. But STATE1
: is using abv, but STATE2 use code, which has to use table 3 to know the abv
: . Each state1(to 7) only contains 1 state or nothing.
: Table 3 is Statecode, State.
: now I want to know how the relationship between table 1 and table 3.
: I want to know in year 2008 and 2007, in each state how man

avatar
B*g
12
好像有点复杂。
state3-7是word,还是code?
你用那个DB? version?

abv,
STATE1
abv
are

【在 l******n 的大作中提到】
: OK, Beijing
: This is my problem.
: Table 1 has Year, STATES, Event. STATES may contain many states and use abv,
: event contains many events
: Table 2 has Year, STATE1, STATE2,..., STATE7, Event1,...,Event10. But STATE1
: is using abv, but STATE2 use code, which has to use table 3 to know the abv
: . Each state1(to 7) only contains 1 state or nothing.
: Table 3 is Statecode, State.
: now I want to know how the relationship between table 1 and table 3.
: I want to know in year 2008 and 2007, in each state how man

avatar
l*n
13
15k data!

【在 n********6 的大作中提到】
: Is it for production? Or just for your research?
: If it is just for your research, change the full state name to abv and put
: them in a temp table might be a way with clear logic for later process.
:
: abv,
: STATE1
: abv

avatar
l*n
14
state 1- 7 all use text, but some of them are abv, some are codes. And the
positions are not fixed.
I am using access and it is the only one I can use.

【在 B*****g 的大作中提到】
: 好像有点复杂。
: state3-7是word,还是code?
: 你用那个DB? version?
:
: abv,
: STATE1
: abv
: are

avatar
B*g
15
cft。
这里都是大牛,每天搞得一个table数据都是几十至上百个Millions。
Access可能难搞一些,我先看看。

put

【在 l******n 的大作中提到】
: 15k data!
avatar
B*g
16
想了想,还是再建个table吧。
Table4
Table4 has ID, Year, STATES, Event, STATES_MIX
(ID is autonumber)
INSERT INTO Table4 (Year, Event, STATES_MIX)
SELECT Year, Event(1-10), STATE(1-7)
WHERE Event(1-10) is not null
AND STATE(1-7) is not null
***70个insert
Option: delete the dup records in table4
Table4 create index on state_mix
UPDATE table4 t4 inner join table3 t3 on t4.state_mix = t3.Statecode set t4.
state = t3.state.
UPDATE table4 t4 inner join table3 t3 on t4.state_mix = t3.State set t4.stat
e = t3.s

【在 l******n 的大作中提到】
: state 1- 7 all use text, but some of them are abv, some are codes. And the
: positions are not fixed.
: I am using access and it is the only one I can use.

avatar
l*n
17
就是就是,呼唤大牛现身

【在 B*****g 的大作中提到】
: cft。
: 这里都是大牛,每天搞得一个table数据都是几十至上百个Millions。
: Access可能难搞一些,我先看看。
:
: put

avatar
j*n
18
不好整,先解决 table1 再说其他:
In States column of table1, the states are delimited by space, so you may
have to come out a string process to read characters one by one, from begin
to the end. put each state as a element of an array.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。