免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1611 | 回复: 6
打印 上一主题 下一主题

[文本处理] 文本筛选的,请大神指点啊,好难哦 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2017-05-20 11:04 |只看该作者 |倒序浏览
文本:table.txt
BOSS_INTERFACE_LOG
P_SERV_ATTR_T
ACCT_RECEIPT_DETAIL_T
CALL_BOSS_SERVICE_LOG_T
CUST_INDENT_FINISH_T
CUST_ORDER_ITEM_T
P_WORK_ORDER_BILLING_BAK_T
P_SERV_PRODUCT_T
P_WORK_ORDER_BILLING_LOG_T
CUST_INDENT_ATTR_T
ORDER_ITEM_GET_T
P_CUST_PRICE_PLAN_T
WD_REPORT_LIST_WP2_T
CUST_INDENT_TACHE_T
INTERFACE_RESOURCE_SALES
GROUP_INSTANT_MAPPING_T
L_CUST_INDENT_TACHE_T
SALES_INDENT_PRICING_PARA_T
P_SERV_PRODUCT_ATTR_T
SALES_INDENT_PRINT_T
BILL_TAX_DETAIL_201704_T
BILL_TAX_DETAIL_201703_T
BILL_DEDUCT_BEFORE_LOAD_T
CUST_INDENT_ARCHIVE_LOG_T
INTERFACE_BILL_SERIAL_T
CUST_ORDER_ITEM_HIS
BATCH_INDENT_INST_T
BACKFILL_LOG_T
BILL_ACCT_ITEM_201704_T
CUST_INDENT_TACHE_LOG_T
SERV_ATTR_T
SERV_PRODUCT_T
GROUP_CHECK_LOG_T
CUST_PRICE_PLAN_T
COMPLETE_WORK_SUCCESS_T
COMPLETE_TASK_LOG_BAK_T
COMPLETE_WORK_LOG_T
H_WORK_ORDER_BILLING_T
AU_URGE_T
WORK_ORDER_OCS_DETAIL_T
BLOCK_HISTORY_T
DEPLOY_SESSION_DETAIL_T
SERV_PRODUCT_ATTR_T
SERV_T
SERV_PROD_G
IMDB_REDO_LOG_BAK_T
IMDB_AU_REDO_LOG_T
SUB_BLOCK_CANDEL
ACCT_BALANCE_INSUFFICIENT_T

文本:file
黄石分公司,2017-05-17 07:15:35,HBHSXUL,HSSJJS,10.37.155.244,133.0.134.17,UPDATE XL_LS A SET A.CUST_ID=(SELECT CUST_ID FROM HS_SERV_T WHERE STATE='F0A' AND SERV_ID=A.SERV_ID),UPDATE,XL_LS A
黄石分公司,2017-05-17 07:17:27,HBHSXUL,HSSJJS,10.37.155.244,133.0.134.17,UPDATE XL_LS A SET PRODUCT_OFFER_ID=(SELECT PRODUCT_OFFER_ID FROM HS_SERV_T WHERE PRODUCT_OFFER_ID='800000907' AND STATE='F0A' AND ACCT_ID=A.ACCT_ID),UPDATE,XL_LS A
省中心业务室,2017-05-17 08:45:05,hbxuwm,HBDX_XUWEIMING,133.0.160.59,133.0.176.3,UPDATE LS65_CRM2.CUST_INDENT_FINISH_T SET STATE = '0' WHERE CUST_INDENT_NBR = '1703112014473500355' AND TYPE = 'BESTPAYREBATESACCEPT',UPDATE,LS65_CRM2.CUST_INDENT_FINISH_T
省中心业务室,2017-05-17 08:47:00,hbxuwm,HBDX_XUWEIMING,133.0.160.59,133.0.176.3,UPDATE LS65_CRM2.CUST_INDENT_FINISH_T SET STATE = '0' WHERE CUST_INDENT_NBR = '1703112014473500355' AND TYPE = 'BESTPAYREBATESACCEPT',UPDATE,LS65_CRM2.CUST_INDENT_FINISH_T
省中心业务室,2017-05-17 10:28:41,hbxuwm,HBDX_XUWEIMING,133.0.160.59,133.0.176.3,UPDATE LS65_CRM2.CUST_INDENT_FINISH_T SET STATE = '0' WHERE CUST_INDENT_NBR = '170517318253300001' AND TYPE = 'BESTPAYREBATESACCEPT',UPDATE,LS65_CRM2.CUST_INDENT_FINISH_T
十堰分公司,2017-05-17 09:08:49,HBSYYANGF,SYSJJS,10.39.21.87,133.0.134.33,CREATE TABLE WDY_ZNZW_T1 AS SELECT AGREEMENT_ID,CHARGE/100 CHARGE FROM LS65_CRM2.CUST_ORDER_ITEM_T@RM A WHERE AGREEMENT_ID IN (SELECT AGREEMENT_ID FROM WDY_ZNZW_T) AND CHARGE!=0,CREATE,TABLE   WDY_ZNZW_T1
十堰分公司,2017-05-17 09:09:50,HBSYYANGF,SYSJJS,10.39.21.87,133.0.134.33,CREATE TABLE WDY_ZNZW_T1 AS SELECT AGREEMENT_ID,CHARGE/100 CHARGE FROM LS65_CRM2.CUST_ORDER_ITEM_T@RM A WHERE AGREEMENT_ID IN (SELECT AGREEMENT_ID FROM WDY_ZNZW_T) AND CHARGE!=0,CREATE,TABLE   WDY_ZNZW_T1
十堰分公司,2017-05-17 09:22:04,HBSYYANGF,SYSJJS,10.39.21.87,133.0.134.33,CREATE TABLE WDY_ZNZW_T1 AS SELECT AGREEMENT_ID,CHARGE/100 CHARGE FROM LS65_CRM2.CUST_ORDER_ITEM_T@RM A WHERE AGREEMENT_ID IN (SELECT AGREEMENT_ID FROM WDY_ZNZW_T) AND CHARGE!=0,CREATE,TABLE   WDY_ZNZW_T1
十堰分公司,2017-05-17 09:44:43,hbsygongyj,SYSJJS,10.39.20.23,133.0.134.33,CREATE TABLE WDY_ZNZW_T1 AS SELECT AGREEMENT_ID,CHARGE/100 CHARGE FROM LS65_CRM2.CUST_ORDER_ITEM_T@RM A WHERE AGREEMENT_ID IN (SELECT AGREEMENT_ID FROM WDY_ZNZW_T) AND CHARGE!=0,CREATE,TABLE   WDY_ZNZW_T1
十堰分公司,2017-05-17 15:42:32,HBSYYANGF,SYSJJS,10.39.21.87,133.0.134.33,CREATE TABLE WDY_ZNZW_T1 AS SELECT AGREEMENT_ID,CHARGE/100 CHARGE FROM LS65_CRM2.CUST_ORDER_ITEM_T@RM A WHERE AGREEMENT_ID IN (SELECT AGREEMENT_ID FROM WDY_ZNZW_T) AND CHARGE!=0,CREATE,TABLE   WDY_ZNZW_T1
十堰分公司,2017-05-17 15:46:42,HBSYYANGF,SYSJJS,10.39.21.87,133.0.134.33,CREATE TABLE WDY_ZNZW_T1 AS SELECT AGREEMENT_ID,CHARGE/100 CHARGE FROM LS65_CRM2.CUST_ORDER_ITEM_T@RM A WHERE AGREEMENT_ID IN (SELECT AGREEMENT_ID FROM WDY_ZNZW_T) AND CHARGE!=0,CREATE,TABLE   WDY_ZNZW_T1
十堰分公司,2017-05-17 16:03:14,HBSYYANGF,SYSJJS,10.39.21.87,133.0.134.33,CREATE TABLE WDY_ZNZW_T1 AS SELECT AGREEMENT_ID,CHARGE/100 CHARGE FROM LS65_CRM2.CUST_ORDER_ITEM_T@RM A WHERE AGREEMENT_ID IN (SELECT AGREEMENT_ID FROM WDY_ZNZW_T) AND CHARGE!=0,CREATE,TABLE   WDY_ZNZW_T1
十堰分公司,2017-05-17 16:25:59,HBSYYANGF,SYSJJS,10.39.21.87,133.0.134.33,CREATE TABLE WDY_ZNZW_T1 AS SELECT AGREEMENT_ID,CHARGE/100 CHARGE FROM LS65_CRM2.CUST_ORDER_ITEM_T@RM A WHERE AGREEMENT_ID IN (SELECT AGREEMENT_ID FROM WDY_ZNZW_T) AND CHARGE!=0,CREATE,TABLE   WDY_ZNZW_T1
十堰分公司,2017-05-17 17:02:39,HBSYYANGF,SYSJJS,10.39.21.87,133.0.134.33,CREATE TABLE WDY_ZNZW_T1 AS SELECT AGREEMENT_ID,CHARGE/100 CHARGE FROM LS65_CRM2.CUST_ORDER_ITEM_T@RM A WHERE AGREEMENT_ID IN (SELECT AGREEMENT_ID FROM WDY_ZNZW_T) AND CHARGE!=0,CREATE,TABLE   WDY_ZNZW_T1
十堰分公司,2017-05-17 17:23:53,HBSYYANGF,SYSJJS,10.39.21.87,133.0.134.33,CREATE TABLE WDY_ZNZW_T1 AS SELECT AGREEMENT_ID,CHARGE/100 CHARGE FROM LS65_CRM2.CUST_ORDER_ITEM_T@RM A WHERE AGREEMENT_ID IN (SELECT AGREEMENT_ID FROM WDY_ZNZW_T) AND CHARGE!=0,CREATE,TABLE   WDY_ZNZW_T1
孝感分公司,2017-05-17 09:25:25,hbxgweijy,XGSCB,10.37.6.26,133.0.134.1,UPDATE WEI_WHJ_GUANGGAI_201704 A SET ITV_BHQC_FLAG='是' WHERE EXISTS( SELECT  SERV_ID,SUM(CHARGE)  FROM  CUST_ORDER_ITEM_T@TO_BCVA2 WHERE PARTITION_ID_REGION=1006 AND BILLING_CYCLE_ID>=400201702 AND PRICE_PLAN_ID=543257 AND SERV_ID=A.SERV_ID GROUP BY REGION_ID_SERV,SERV_ID HAVING SUM(CHARGE)>10000) AND SERVICE_TYPE='/S/O/OTHER',UPDATE   WEI_WHJ_GUANGGAI_201704 A
襄阳分公司,2017-05-17 10:06:36,hbxyjiangk,XY_USER,10.36.163.209,133.0.134.193,UPDATE CUST_ORDER_ITEM_T@TO_XF_LYJ SET CHARGE_GET = 0.000000, STATE = '0' WHERE ROWID = 'AAJNPBAL0AAA+TBAAU',UPDATE,CUST_ORDER_ITEM_T@TO_XF_LYJ
随州分公司,2017-05-17 08:15:15,hbszchenyh,SZSJJS,10.38.222.5,133.0.134.113,CREATE TABLE GS_LI_LI_TEMPXZ1 AS SELECT B.AGREEMENT_ID,B.SECOND_OBJECT_ID,B.SERVER_OFFER_ID,C.SERVICE_OFFER_NAME,C.SERVICE_OFFER_DESC,B.CREATE_DATE,A.COMPLETE_DATE,B.A_OBJECT_VALUE,B.N_OBJECT_VALUE ,A.STAFF_ID FROM GS_LI_LI_TEMPXZ A ,LS65_CRM2.CUST_INDENT_ATTR_T@TO_QT B  ,GS_LI_LI_SERVICE C WHERE A.AGREEMENT_ID=B.AGREEMENT_ID AND A.CUST_INDENT_NBR=B.CUST_INDENT_NBR AND B.INDENT_STATE=700 AND B.SERVER_OFFER_ID =C.SERVICE_OFFER_ID GROUP BY B.AGREEMENT_ID,B.SECOND_OBJECT_ID,B.SERVER_OFFER_ID,C.SERVICE_OFFER_NAME,C.SERVICE_OFFER_DESC,B.CREATE_DATE,A.COMPLETE_DATE ,B.A_OBJECT_VALUE,B.N_OBJECT_VALUE ,A.STAFF_ID ORDER BY B.AGREEMENT_ID,SERVER_OFFER_ID,CREATE,TABLE   GS_LI_LI_TEMPXZ1
随州分公司,2017-05-17 08:26:20,hbszchenyh,SZSJJS,10.38.222.5,133.0.134.113,CREATE TABLE GSPDG_NBR_TJ02 AS SELECT * FROM  LS65_CRM2.CUST_INDENT_ATTR_T@TO_QT WHERE AGREEMENT_ID IN(SELECT AGREEMENT_ID FROM GSPDG_NBR_TJ01),CREATE,TABLE   GSPDG_NBR_TJ02
咸宁分公司,2017-05-17 09:18:38,hbxnzhengw,xnsjjs,10.37.190.174,133.0.134.49,CREATE OR REPLACE PROCEDURE PRO_ZW_ZQ_RICHANG_DETAIL   IS --根据发展人来进行工单统计 BEGIN   /*  DELETE FROM ZW_ZQ_FZR_TONGJI ;  INSERT INTO ZW_ZQ_FZR_TONGJI    SELECT D.ACC_NBR ,A.* ,  B.CUST_INDENT_NBR , B.SERVER_OFFER_ID ,C.SERVICE_OFFER_NAME    FROM LS65_CRM2.CUST_INDENT_EXTEND_ATTR_T@TO_QTXX_TB A   , LS65_CRM2.CUST_INDENT_ATTR_T@TO_QTXX_TB B ,SERVICE_OFFER_T C   ,LS65_CRM2.P_SERV_T@TO_QTXX_TB  D  WHERE  ATTR_TYPE ='DEVELOPER'   AND A.CREATE_DATE > TO_DATE('20170101','YYYYMMDD')   AND ATTR_VAL  IN ('Y42120166122','Y42098145268')  AND A.AGREEMENT_ID =B.AGREEMENT_ID   --ATTR_VAL  填写发展人的集团编码信息  AND B.SERVER_OFFER_ID=C.SERVICE_OFFER_ID  AND C.SERVICE_OFFER_NAME LIKE '%新装%'  AND A.AGREEMENT_ID =D.AGREEMENT_ID ;  */  COMMIT ; END ;,CREATE, OR REPLACE   PROCEDURE   PRO_ZW_ZQ_RICHANG_DETAIL
十堰分公司,2017-05-17 16:43:09,hbsyyuanyl,SY_GANZHIRONG,10.39.48.73,133.0.176.23,CREATE TABLE LHT AS SELECT A.AGREEMENT_ID,A.CUST_INDENT_NBR,A.SALES_INDENT_ID,A.CREATE_DATE,A.CUST_ID, B.ORG_ID,B.ORG_NAME,C.SERVER_OFFER_ID,D.SERVICE_OFFER_NAME FROM CUST_INDENT_T@SY_CRM A,ORGANIZATION_T B, LS65_CRM2.CUST_INDENT_ATTR_T@SY_CRM C,SERVICE_OFFER_T D WHERE A.SITE_ID=B.ORG_ID AND A.AGREEMENT_ID=C.AGREEMENT_ID AND C.SERVER_OFFER_ID=D.SERVICE_OFFER_ID AND C.SERVER_OFFER_ID IN (100001,400001,100031,611740,611758,611747,124093, 101028,500075,400075,422742) AND TO_CHAR(A.CREATE_DATE,'YYYYMMDD') BETWEEN 20170516  AND 20170516 AND A.PARTITION_ID_REGION=1009 AND A.INDENT_STATE NOT IN (400,600),CREATE,TABLE   LHT
咸宁分公司,2017-05-17 09:18:38,hbxnzhengw,xnsjjs,10.37.190.174,133.0.134.49,CREATE OR REPLACE PROCEDURE PRO_ZW_ZQ_RICHANG_DETAIL   IS --根据发展人来进行工单统计 BEGIN   /*  DELETE FROM ZW_ZQ_FZR_TONGJI ;  INSERT INTO ZW_ZQ_FZR_TONGJI    SELECT D.ACC_NBR ,A.* ,  B.CUST_INDENT_NBR , B.SERVER_OFFER_ID ,C.SERVICE_OFFER_NAME    FROM LS65_CRM2.CUST_INDENT_EXTEND_ATTR_T@TO_QTXX_TB A   , LS65_CRM2.CUST_INDENT_ATTR_T@TO_QTXX_TB B ,SERVICE_OFFER_T C   ,LS65_CRM2.P_SERV_T@TO_QTXX_TB  D  WHERE  ATTR_TYPE ='DEVELOPER'   AND A.CREATE_DATE > TO_DATE('20170101','YYYYMMDD')   AND ATTR_VAL  IN ('Y42120166122','Y42098145268')  AND A.AGREEMENT_ID =B.AGREEMENT_ID   --ATTR_VAL  填写发展人的集团编码信息  AND B.SERVER_OFFER_ID=C.SERVICE_OFFER_ID  AND C.SERVICE_OFFER_NAME LIKE '%新装%'  AND A.AGREEMENT_ID =D.AGREEMENT_ID ;  */  COMMIT ; END ;,CREATE,OR REPLACE   PROCEDURE   PRO_ZW_ZQ_RICHANG_DETAIL
宜昌分公司,2017-05-17 12:02:49,hbyctangsw,YC_ZHANGSHIHUA,10.38.129.202,133.0.176.3,UPDATE LS65_CRM2.CUST_INDENT_ATTR_T A SET A_OBJECT_VALUE='810000695' WHERE ATTRIBUTE_ID='PRODUCT_OFFER_ID' AND   AGREEMENT_ID IN(SELECT  AGREEMENT_ID FROM CUST_INDENT_T   T WHERE SALES_INDENT_ID='354327751' ),UPDATE,   LS65_CRM2.CUST_INDENT_ATTR_T A
咸宁分公司,2017-05-17 09:18:38,hbxnzhengw,xnsjjs,10.37.190.174,133.0.134.49,CREATE OR REPLACE PROCEDURE PRO_ZW_ZQ_RICHANG_DETAIL   IS --根据发展人来进行工单统计 BEGIN   /*  DELETE FROM ZW_ZQ_FZR_TONGJI ;  INSERT INTO ZW_ZQ_FZR_TONGJI    SELECT D.ACC_NBR ,A.* ,  B.CUST_INDENT_NBR , B.SERVER_OFFER_ID ,C.SERVICE_OFFER_NAME    FROM LS65_CRM2.CUST_INDENT_EXTEND_ATTR_T@TO_QTXX_TB A   , LS65_CRM2.CUST_INDENT_ATTR_T@TO_QTXX_TB B ,SERVICE_OFFER_T C   ,LS65_CRM2.P_SERV_T@TO_QTXX_TB  D  WHERE  ATTR_TYPE ='DEVELOPER'   AND A.CREATE_DATE > TO_DATE('20170101','YYYYMMDD')   AND ATTR_VAL  IN ('Y42120166122','Y42098145268')  AND A.AGREEMENT_ID =B.AGREEMENT_ID   --ATTR_VAL  填写发展人的集团编码信息  AND B.SERVER_OFFER_ID=C.SERVICE_OFFER_ID  AND C.SERVICE_OFFER_NAME LIKE '%新装%'  AND A.AGREEMENT_ID =D.AGREEMENT_ID ;  */  COMMIT ; END ;,CREATE,OR REPLACE   PROCEDURE   PRO_ZW_ZQ_RICHANG_DETAIL
黄石分公司,2017-05-17 12:27:15,HBHSHET,HSSJJS,10.37.160.196,133.0.134.17,CREATE TABLE  HT_YCX_SR AS SELECT TO_CHAR(STATE_DATE,'YYYYMMDD') STATE_DATE, CHARGE_GET/100 CHARGE ,SUBSTR(REGION_ID_SERV,1,6)  REGION_ID_SERV ,COUNT(*) NUM FROM  LS65_CRM2.ORDER_ITEM_GET_T@TO_QTBZTB WHERE PARTITION_ID_REGION=1011 AND  ITEM_SOURCE_ID=950 AND  PARTITION_ID_MONTH=17 AND SUBSTR(PAY_CYCLE_ID,4,6)=201705 AND ACCT_ITEM_TYPE_ID IN(SELECT ITEM_ID FROM ACCT_ITEM_TEMP_T WHERE   ITEM_ID NOT IN(732020010,773110021,773110022,771110875,771110876,771110250,732020080,773110035)) AND CHARGE_GET<>0 AND TO_CHAR(STATE_DATE,'YYYYMMDD')>='20170501' GROUP BY  TO_CHAR(STATE_DATE,'YYYYMMDD'),CHARGE_GET/100,SUBSTR(REGION_ID_SERV,1,6),CREATE,TABLE    HT_YCX_SR
黄石分公司,2017-05-17 08:19:50,hbhstengll,HS_RUANWENJIE,10.37.165.66,133.0.176.21,UPDATE PM_GDJK A SET  (CHARGE_STD,CHARGE_DISCT,CHARGE,CHARGE_GET)= (SELECT SUM(CHARGE_STD)/100,SUM(CHARGE_DISCT)/100,SUM(CHARGE)/100,SUM(CHARGE_GET)/100 FROM LS65_CRM2.ORDER_ITEM_GET_T@TO_A2SVC1_QUERY WHERE A.AGREEMENT_ID=AGREEMENT_ID AND A.SERV_ID=SERV_ID AND ACCT_ITEM_TYPE_ID IN (711010020,732020010, 712030010,722010200,712050010,732020010) AND AGREEMENT_ID LIKE '2011%'),UPDATE   PM_GDJK A
孝感分公司,2017-05-17 19:20:07,hbxgtianqb,XGYW,10.37.3.171,133.0.134.1,CREATE,TABLE TIAN_XF AS SELECT /*C.SALES_INDENT_ID,A.AGREEMENT_ID,C.CUST_INDENT_NBR,*/DISTINCT A.SERV_ID,A.ACC_NBR,B.PRICING_PLAN_ID, B.CUST_PRICE_DESC,C.SITE_ID,A.CREATE_DATE FROM LS65_CRM2.P_SERV_T@TB_QT A,LS65_CRM2.P_CUST_PRICE_PLAN_T@TB_QT B,LS65_CRM2.CUST_INDENT_T@TB_QT C WHERE A.AGREEMENT_ID=B.AGREEMENT_ID AND A.AGREEMENT_ID=C.AGREEMENT_ID AND B.PRICING_PLAN_ID IN(543351,543352) AND A.REGION_ID LIKE '100608%' AND C.INDENT_STATE=700 AND B.OPER_FLAG=1,CREATE,TABLE   TIAN_XF
武汉分公司,2017-05-17 08:27:32,whzengxy,LS65_CRM1,10.36.111.25,133.0.176.8,UPDATE LS65_CRM1.P_CUST_PRICE_PLAN_T SET CUST_PRICE_PLAN_SEQ_ID = :V1 WHERE ROWID = 'AAQTI2AL0AAAWOXAAS',UPDATE,LS65_CRM1.P_CUST_PRICE_PLAN_T
武汉分公司,2017-05-17 08:28:02,whzengxy,LS65_CRM1,10.36.111.25,133.0.176.8,DELETE FROM LS65_CRM1.P_CUST_PRICE_PLAN_T WHERE ROWID = 'AAQTI2AL0AAAWOXAAS',DELETE,FROM   LS65_CRM1.P_CUST_PRICE_PLAN_T
黄石分公司,2017-05-17 08:11:46,hbhstengll,HS_RUANWENJIE,10.37.165.66,133.0.176.21,CREATE TABLE PM_GDJK AS  SELECT B.STAFF_CODE ,B.NAME STAFF_NAME,C.ORG_NAME ,  A.CUST_ID ,A.AGREEMENT_ID,A.CUST_INDENT_NBR ,A.REGION_ID ,A.CREATE_DATE CUST_CREATE_DATE,SALES_INDENT_ID ,A.INDENT_STATE  FROM LS65_CRM2.CUST_INDENT_T@TO_A2SVC1_QUERY A ,STAFF_T B ,ORGANIZATION_T C  WHERE  A.STAFF_ID=B.STAFF_ID  AND A.SITE_ID=C.ORG_ID  AND A.AGREEMENT_ID LIKE '2011%'  AND   INDENT_STATE='100' AND TO_CHAR(A.CREATE_DATE,'YYYYMM')>='201608'  AND EXISTS        (SELECT 1 FROM  LS65_CRM2.CUST_INDENT_TACHE_T@TO_A2SVC1_QUERY T         WHERE A.CUST_INDENT_NBR=T.CUST_INDENT_NBR         AND T.AGREEMENT_ID LIKE '2011%' )   ORDER BY A.CREATE_DATE,CREATE,TABLE   PM_GDJK
武汉分公司,2017-05-17 14:37:25,whyangdh,HBWH_CRM_KF,133.2.7.83,133.0.176.8,CREATE TABLE YDH_1124 AS SELECT A.AGREEMENT_ID,A.CUST_INDENT_NBR,A.SALES_INDENT_ID FROM LS65_CRM1.CUST_INDENT_T A WHERE A.INDENT_STATE='100' AND NOT EXISTS( SELECT 1 FROM LS65_CRM1.CUST_INDENT_TACHE_T B WHERE B.AGREEMENT_ID=A.AGREEMENT_ID AND B.OPERATE_TACHE=7) AND NOT EXISTS( SELECT 1 FROM LS65_CRM1.CUST_INDENT_TACHE_T B WHERE B.AGREEMENT_ID=A.AGREEMENT_ID AND B.DEAL_FLAG=0) AND A.STAFF_ID<>100000005,CREATE,TABLE   YDH_1124
黄石分公司,2017-05-17 08:12:18,hbhstengll,HS_RUANWENJIE,10.37.165.66,133.0.176.21,UPDATE PM_GDJK A SET (OPERATE_TACHE,INDENT_STATE,DEAL_FLAG)=(SELECT OPERATE_TACHE,INDENT_STATE,DEAL_FLAG FROM LS65_CRM2.CUST_INDENT_TACHE_T@TO_A2SVC1_QUERY WHERE OPERATE_TACHE='1' AND DEAL_FLAG='0' AND A.CUST_INDENT_NBR=CUST_INDENT_NBR AND AGREEMENT_ID LIKE '2011%') WHERE OPERATE_TACHE IS NULL,UPDATE,PM_GDJK A
黄石分公司,2017-05-17 08:12:19,hbhstengll,HS_RUANWENJIE,10.37.165.66,133.0.176.21,UPDATE PM_GDJK A SET (OPERATE_TACHE,INDENT_STATE,DEAL_FLAG)=(SELECT OPERATE_TACHE,INDENT_STATE,DEAL_FLAG FROM LS65_CRM2.CUST_INDENT_TACHE_T@TO_A2SVC1_QUERY WHERE OPERATE_TACHE='2' AND DEAL_FLAG='0' AND A.CUST_INDENT_NBR=CUST_INDENT_NBR AND AGREEMENT_ID LIKE '2011%') WHERE OPERATE_TACHE IS NULL,UPDATE,PM_GDJK A
黄石分公司,2017-05-17 08:12:21,hbhstengll,HS_RUANWENJIE,10.37.165.66,133.0.176.21,UPDATE PM_GDJK A SET (OPERATE_TACHE,INDENT_STATE,DEAL_FLAG)=(SELECT OPERATE_TACHE,INDENT_STATE,DEAL_FLAG FROM LS65_CRM2.CUST_INDENT_TACHE_T@TO_A2SVC1_QUERY WHERE OPERATE_TACHE='3' AND DEAL_FLAG='0' AND A.CUST_INDENT_NBR=CUST_INDENT_NBR AND AGREEMENT_ID LIKE '2011%') WHERE ORG_NAME<>'黄石10000宽带快装销售点' AND OPERATE_TACHE IS NULL,UPDATE,PM_GDJK A
黄石分公司,2017-05-17 08:12:23,hbhstengll,HS_RUANWENJIE,10.37.165.66,133.0.176.21,UPDATE PM_GDJK A SET (OPERATE_TACHE,INDENT_STATE,DEAL_FLAG)=(SELECT OPERATE_TACHE,INDENT_STATE,DEAL_FLAG FROM LS65_CRM2.CUST_INDENT_TACHE_T@TO_A2SVC1_QUERY WHERE OPERATE_TACHE='4' AND DEAL_FLAG='0' AND A.CUST_INDENT_NBR=CUST_INDENT_NBR AND AGREEMENT_ID LIKE '2011%') WHERE OPERATE_TACHE IS NULL,UPDATE,PM_GDJK A
黄石分公司,2017-05-17 08:16:33,hbhstengll,HS_RUANWENJIE,10.37.165.66,133.0.176.21,UPDATE PM_GDJK A SET (OPERATE_TACHE,INDENT_STATE,DEAL_FLAG)=(SELECT OPERATE_TACHE,INDENT_STATE,DEAL_FLAG FROM LS65_CRM2.CUST_INDENT_TACHE_T@TO_A2SVC1_QUERY WHERE OPERATE_TACHE='5' AND DEAL_FLAG='0' AND A.CUST_INDENT_NBR=CUST_INDENT_NBR AND AGREEMENT_ID LIKE '2011%') WHERE OPERATE_TACHE IS NULL,UPDATE,PM_GDJK A
黄石分公司,2017-05-17 08:18:02,hbhstengll,HS_RUANWENJIE,10.37.165.66,133.0.176.21,UPDATE PM_GDJK A SET (OPERATE_TACHE,INDENT_STATE,DEAL_FLAG)=(SELECT OPERATE_TACHE,INDENT_STATE,DEAL_FLAG FROM LS65_CRM2.CUST_INDENT_TACHE_T@TO_A2SVC1_QUERY WHERE OPERATE_TACHE='6' AND DEAL_FLAG='0' AND A.CUST_INDENT_NBR=CUST_INDENT_NBR AND AGREEMENT_ID LIKE '2011%') WHERE OPERATE_TACHE IS NULL,UPDATE,PM_GDJK A
黄石分公司,2017-05-17 08:18:04,hbhstengll,HS_RUANWENJIE,10.37.165.66,133.0.176.21,UPDATE PM_GDJK A SET (OPERATE_TACHE,INDENT_STATE,DEAL_FLAG)=(SELECT OPERATE_TACHE,INDENT_STATE,DEAL_FLAG FROM LS65_CRM2.CUST_INDENT_TACHE_T@TO_A2SVC1_QUERY WHERE OPERATE_TACHE='7' AND DEAL_FLAG='0' AND A.CUST_INDENT_NBR=CUST_INDENT_NBR AND AGREEMENT_ID LIKE '2011%') WHERE OPERATE_TACHE IS NULL,UPDATE,PM_GDJK A

要求:提取file文件中的表名,和table.txt中的表名做对比,如果有就把file中涉及的这张表的整行打印出来:表名位置:
在每行的最后...拿第一行为例
黄石分公司,2017-05-17 07:15:35,HBHSXUL,HSSJJS,10.37.155.244,133.0.134.17,UPDATE XL_LS A SET A.CUST_ID=(SELECT CUST_ID FROM HS_SERV_T WHERE STATE='F0A' AND SERV_ID=A.SERV_ID),UPDATE,XL_LS A   XL_LS 为表名,假如table.txt中有XL_LS这张表,那么就把这行输出,  后面的A的表的别名,不考虑


论坛徽章:
0
2 [报告]
发表于 2017-05-20 12:01 |只看该作者
湖北人民前来核电

论坛徽章:
39
辰龙
日期:2013-08-21 15:45:192015亚冠之广州富力
日期:2015-05-12 16:34:52亥猪
日期:2015-03-03 17:22:00申猴
日期:2015-03-03 17:21:37未羊
日期:2014-10-10 13:45:41戌狗
日期:2014-06-17 09:53:29巨蟹座
日期:2014-06-12 23:17:17双鱼座
日期:2014-06-10 12:42:44寅虎
日期:2014-06-09 12:52:172015亚冠之卡尔希纳萨夫
日期:2015-05-24 15:24:35黄金圣斗士
日期:2015-12-02 17:25:0815-16赛季CBA联赛之吉林
日期:2017-06-24 16:43:52
3 [报告]
发表于 2017-05-20 12:44 |只看该作者
file 文件中的表名,有何规律?

论坛徽章:
0
4 [报告]
发表于 2017-05-20 13:12 |只看该作者
回复 3# 关阴月飞

1、每一行的最后的UPDATE逗号后面就是表名,前面的不算...必须最后的 那个A 是表的别名,有的行有,有的行没有...


2、这个是没有使用别名的


论坛徽章:
39
辰龙
日期:2013-08-21 15:45:192015亚冠之广州富力
日期:2015-05-12 16:34:52亥猪
日期:2015-03-03 17:22:00申猴
日期:2015-03-03 17:21:37未羊
日期:2014-10-10 13:45:41戌狗
日期:2014-06-17 09:53:29巨蟹座
日期:2014-06-12 23:17:17双鱼座
日期:2014-06-10 12:42:44寅虎
日期:2014-06-09 12:52:172015亚冠之卡尔希纳萨夫
日期:2015-05-24 15:24:35黄金圣斗士
日期:2015-12-02 17:25:0815-16赛季CBA联赛之吉林
日期:2017-06-24 16:43:52
5 [报告]
发表于 2017-05-20 14:04 |只看该作者
本帖最后由 关阴月飞 于 2017-05-20 14:06 编辑

回复 4# victor2016

武汉分公司,2017-05-17 08:27:32,whzengxy,LS65_CRM1,10.36.111.25,133.0.176.8,UPDATE LS65_CRM1.P_CUST_PRICE_PLAN_T SET CUST_PRICE_PLAN_SEQ_ID = :V1 WHERE ROWID = 'AAQTI2AL0AAAWOXAAS',UPDATE,LS65_CRM1.P_CUST_PRICE_PLAN_T
武汉分公司,2017-05-17 08:28:02,whzengxy,LS65_CRM1,10.36.111.25,133.0.176.8,DELETE FROM LS65_CRM1.P_CUST_PRICE_PLAN_T WHERE ROWID = 'AAQTI2AL0AAAWOXAAS',DELETE,FROM   LS65_CRM1.P_CUST_PRICE_PLAN_T

黄石分公司,2017-05-17 08:11:46,hbhstengll,HS_RUANWENJIE,10.37.165.66,133.0.176.21,CREATE TABLE PM_GDJK AS  SELECT B.STAFF_CODE ,B.NAME STAFF_NAME,C.ORG_NAME ,  A.CUST_ID ,A.AGREEMENT_ID,A.CUST_INDENT_NBR ,A.REGION_ID ,A.CREATE_DATE CUST_CREATE_DATE,SALES_INDENT_ID ,A.INDENT_STATE  FROM LS65_CRM2.CUST_INDENT_T@TO_A2SVC1_QUERY A ,STAFF_T B ,ORGANIZATION_T C  WHERE  A.STAFF_ID=B.STAFF_ID  AND A.SITE_ID=C.ORG_ID  AND A.AGREEMENT_ID LIKE '2011%'  AND   INDENT_STATE='100' AND TO_CHAR(A.CREATE_DATE,'YYYYMM')>='201608'  AND EXISTS        (SELECT 1
FROM  LS65_CRM2.CUST_INDENT_TACHE_T@TO_A2SVC1_QUERY T         WHERE A.CUST_INDENT_NBR=T.CUST_INDENT_NBR         AND T.AGREEMENT_ID LIKE '2011%' )   ORDER BY A.CREATE_DATE,CREATE,TABLE   PM_GDJK

武汉分公司,2017-05-17 14:37:25,whyangdh,HBWH_CRM_KF,133.2.7.83,133.0.176.8,CREATE TABLE YDH_1124 AS SELECT



这几行表名在哪,最后面可没有update


论坛徽章:
39
辰龙
日期:2013-08-21 15:45:192015亚冠之广州富力
日期:2015-05-12 16:34:52亥猪
日期:2015-03-03 17:22:00申猴
日期:2015-03-03 17:21:37未羊
日期:2014-10-10 13:45:41戌狗
日期:2014-06-17 09:53:29巨蟹座
日期:2014-06-12 23:17:17双鱼座
日期:2014-06-10 12:42:44寅虎
日期:2014-06-09 12:52:172015亚冠之卡尔希纳萨夫
日期:2015-05-24 15:24:35黄金圣斗士
日期:2015-12-02 17:25:0815-16赛季CBA联赛之吉林
日期:2017-06-24 16:43:52
6 [报告]
发表于 2017-05-20 14:04 |只看该作者
发重了

论坛徽章:
0
7 [报告]
发表于 2017-05-20 15:03 |只看该作者
回复 5# 关阴月飞

略过,只处理update后面的...
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP