回答|共 32 个

Purple2008 LV16

发表于 9-4-2009 13:29:21 | 显示全部楼层

这种东西,只有要用了才去学。以前因工作熟悉了一段时间,可现在差不多全忘了。哈哈哈,。

卖短裤上网 LV18

发表于 9-4-2009 14:49:46 | 显示全部楼层

找86,他是牛人

weeguo LV5

发表于 9-4-2009 15:52:43 | 显示全部楼层

假设3个table bom_main , bom_sub1, bom_sub2
bom_main table 包含Id_main (PK)    Field1    Id_sub2(PK)  Field2      
以此类推3个table各自有自己的 column
架设你知道bom_main里 field ='123' 你想要知道相关 ...
hangzhouren 发表于 9-4-2009 12:32


if i some of my bom (assembly) have 3 or 4 sub bom (sub-assembly), some assembly have 30 or more sub-boms, do i need to create more than 30 fields in the main bom? and create more than 30 (primary Keys) in the main bom?

do i need manualy create each table for each assembly? or i can create a table for all my assembly?

weeguo LV5

发表于 9-4-2009 15:55:04 | 显示全部楼层

找86,他是牛人
卖短裤上网 发表于 9-4-2009 14:49


我在外面看到你顶帖, 还以为 你也会 数据库 呢。。。。吓了我一跳。

weeguo LV5

发表于 10-4-2009 21:36:31 | 显示全部楼层

嗯,我就是想在这里找个人当面教我。不过,还没有人 自告奋勇

forgetmenot LV17

发表于 10-4-2009 21:45:52 | 显示全部楼层

谁让你那么恶心
换个帅的

如果有1天 LV12

发表于 10-4-2009 22:20:40 | 显示全部楼层

excel 应该没有问题的吧。
实在不行的话,就写用VBA写宏。

如果有1天 LV12

发表于 10-4-2009 22:36:16 | 显示全部楼层

本帖最后由 如果有1天 于 10-4-2009 22:38 编辑
if i some of my bom (assembly) have 3 or 4 sub bom (sub-assembly), some assembly have 30 or more sub-boms, do i need to create more than 30 fields in the main bom? and create more than 30 (primary K ...
weeguo 发表于 9-4-2009 15:52

I think you can only create one table.
Just need to add one column to indicate which is parent.
Parent is the id of the other record.

For example:
id-parent-filed1-filed2
1-0-a-b
2-1-a1-b1
3-1-a2-b2
4-2-a3-b3

then you can get all the result via SQL.

fengfriend LV7

发表于 10-4-2009 22:42:01 | 显示全部楼层

用SQLserver 2000 了  很好用的 比access 强大

weeguo LV5

发表于 13-4-2009 09:57:44 | 显示全部楼层

Parent is the id of the other record.

For example:
id-parent-filed1-filed2
1-0-a-b
2-1-a1-b1
3-1-a2-b2 ...
如果有1天 发表于 10-4-2009 22:36 [/quote]



thanks for your advise.

your solution is suitable for single assembly architecture.

but, in real environment. one sub-assembly might belong to multiple asseblies or other sub-assemblys, so can not use simple "o", or "1" to identify it's parental position.

vba is not suitable for starters here.
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则