Chinaunix首页 | 论坛 | 博客
  • 博客访问: 466810
  • 博文数量: 65
  • 博客积分: 2645
  • 博客等级: 少校
  • 技术积分: 675
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-08 17:04
文章分类

全部博文(65)

文章存档

2010年(5)

2009年(5)

2008年(14)

2007年(35)

2006年(6)

分类:

2007-05-22 13:43:13

問題:
    表 tf_r_simcard 中字段 rsvalue2 的長度從20變為32. 需要修改文件.
解決方法:
    在定義宏的文件中新增宏
    #define TF_R_SIMCARD_RSVALUE2_LEN 32
    用宏替換文件中定義 tf_r_simcard.rsvalue2 長度的相應部分.
    
查找需要修改的文件:
    step 1: 取包含表 tf_r_simcard 的文件
        grep -i tf_r_simcard *.pc | awk -F: '{ print $1}' > tf_r_simcard.txt
    step 2: 取包含字段 rsvalue2 的文件
        grep -i rsvalue2 *.pc | awk -F: '{ print $1}' > rsvalue2.txt
    step 3: 建表, 存數據  --想確定libin_tmp是否存在, 如存在, 確定是否可以(truncate ~, drop ~) ^^,
        -- Create table
        create table LIBIN_TMP
        (
          FILENAME VARCHAR2(50) not null
        )
        tablespace CBS_DATA01
          pctfree 10
          initrans 1
          maxtrans 255
          storage
          (
            initial 16
            minextents 1
            maxextents unlimited
          );

       
        create table libin_tmp_rs2
          as select * from libin_tmp;
         
        將文件 tf_r_simcard.txt 導入 libin_tmp , 文件 rsvalue2.txt 導入 表 libin_tmp_rs2
    step 4: 取tf_r_simcard.txt, rsvalue2.txt 中數據的交集, 并取出非重復數據
        select distinct a.*
          from libin_tmp a, libin_tmp_rs2 b
         where a.filename = b.filename
        ;
    step 5: 從中(step 4取出的數據)篩選出需要修改的文件.
                                
 
阅读(1262) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~