cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

alt text

alt text

JOIN CROSS table

Table for bom this is the source table

Pictures of the second to the fourth line is the result of crosstab I want: his watch on the basis of the results of production area horizontal display reports Rows into columns : iphone 5 based products processing center back to classify horizontally   Please help thank you very much

0 Likes
View Entire Topic
ximen
Participant
0 Likes

@Yufei Guo
下面那个BOM(图片)是源表,我想把他做成交叉的等式的表格式如excel第一二行的。形式我应该如何写代码 你可以理解为交叉表,我把生产区域放在了标题行里面.可以是动态的语句吗?

Below the BOM (picture) is the source table, I want him to make cross-tabular equation as excel first two rows. How should I write code form                                     You can understand the crosstab, I put on a production area inside the header row.

Dynamic SQL code ? 1 2 3 4 5 6

  现有表
    BOM table
    product_name(主产品)    WO_bom(材料名称)      machining center(加工中心)
     IPhone 5               shell(手机外壳)          china-taiwan(中国台湾)
     iphone 5            mainbord(手机主板)          china-shenzhen(中国深圳)
     IPhone 5     blunt appliances(冲电器)           USA

    想要的表结构为:
    result for:

alt text Rows into columns

ximen
Participant
0 Likes

http://sqlanywhere.blogspot.com/2010/01/crosstab-rotate-pivot.html 是否可以写函数针对行转列的方法,写函数来处理这些?