【发布时间】:2013-05-03 07:52:09
【问题描述】:
假设我有一个从 oracle 数据库中检索到的数据表,格式如下
SNo. | Product | Cost
-------------------------------------------------
1 | colgate,closeup,pepsodent | 50
2 | rin,surf | 100
我需要使用 linq 将其更改为以下格式。需要在逗号的帮助下通过保持其他列相同来分隔产品列。
SNo. | Product | Cost
-------------------------------------
1 | colgate | 50
1 | closeup | 50
1 | pepsodent | 50
2 | rin | 100
2 | surf | 100
【问题讨论】:
-
您能否使用 | 分隔列? ?似乎很难理解您的表结构。
-
产品好像是按成本分组的??