Oracle中通过游标执行带参数的存储过程实现解析CLOB字段内的xml字符串:

摘要:近来之前的项目数据出现了问题,原因是由于之前在设计数据库的时候把时间字段设置成了字符串格式,所以给后期的数据操作带来了很大的麻烦,这里提醒一下各位程序猿,以后在开发项目的时候时间字段一定要是时间字段,不要为了方便操作就设成字符串,这样后期改你带来的麻烦是你想象不到的,接下来就看看我解决这个问题的方法吧!

一:存储数据的零时表:


二:零时表里CLOB字段里面存储的xml字符串格式:












三:存储解析完成的xml的数据表:


四:执行解析CLOB字段里面xml字符串的存储过程SQL:

CREATE OR REPLACE PROCEDURE MIP.MIP_PARSE (xmlStr IN CLOB)
ISSTYP     VARCHAR2 (100);RENO     VARCHAR2 (100);AIRLINE  VARCHAR2 (100);FFID     VARCHAR2 (100);FFID_A   VARCHAR2 (100);FFID_D   VARCHAR2 (100);ABNS     VARCHAR2 (100);ACFT     VARCHAR2 (100);CHDT     VARCHAR2 (100);EIBT     VARCHAR2 (100);FATA     VARCHAR2 (100);FETA     VARCHAR2 (100);FSTA     VARCHAR2 (100);LMDT     VARCHAR2 (100);LMUR     VARCHAR2 (100);PSTM     VARCHAR2 (100);RWAY     VARCHAR2 (100);SPOT     VARCHAR2 (100);STND     VARCHAR2 (100);SDEC     VARCHAR2 (100);A_TOBT   VARCHAR2 (100);A_WEATHER     VARCHAR2 (100);ASAT     VARCHAR2 (100);BCTM     VARCHAR2 (100);BOTM     VARCHAR2 (100);BETM     VARCHAR2 (100);BSTM     VARCHAR2 (100);C_TOBT   VARCHAR2 (100);COBT     VARCHAR2 (100);CTOT     VARCHAR2 (100);DINT     VARCHAR2 (100);DLAB     VARCHAR2 (100);DNAP     VARCHAR2 (100);DOUT     VARCHAR2 (100);EDDI     VARCHAR2 (100);EOBT     VARCHAR2 (100);EPGT     VARCHAR2 (100);EPOT     VARCHAR2 (100);FATD     VARCHAR2 (100);FSTD     VARCHAR2 (100);OFTM     VARCHAR2 (100);STDI     VARCHAR2 (100);TSAT     VARCHAR2 (100);FLIGHTNUMBER VARCHAR2 (100);FLIGHTMARK   VARCHAR2 (100);ALAP     VARCHAR2 (100);APRT     VARCHAR2 (100);DPRT     VARCHAR2 (100);PARK     VARCHAR2 (100);INTERNALORINTERNATIONAL  VARCHAR2 (100);TERMINAL VARCHAR2 (100);GROUNDDISTRIBUTION VARCHAR2 (100);--定义出港信息表要格式的时间字段A_TOBT_D VARCHAR2 (100);ASAT_D   VARCHAR2 (100);BCTM_D   VARCHAR2 (100);BOTM_D   VARCHAR2 (100);BETM_D   VARCHAR2 (100);C_TOBT_D VARCHAR2 (100);COBT_D   VARCHAR2 (100);CTOT_D   VARCHAR2 (100);DINT_D   VARCHAR2 (100);DOUT_D   VARCHAR2 (100);EDDI_D   VARCHAR2 (100);EOBT_D   VARCHAR2 (100);EPGT_D   VARCHAR2 (100);EPOT_D   VARCHAR2 (100);FATD_D   VARCHAR2 (100);FSTD_D   VARCHAR2 (100);LMDT_D   VARCHAR2 (100);OFTM_D   VARCHAR2 (100);STDI_D   VARCHAR2 (100);TSAT_D   VARCHAR2 (100);--定义进港信息表要格式化的时间字段BSTM_A     VARCHAR2 (100);EIBT_A   VARCHAR2 (100);FATA_A   VARCHAR2 (100);FETA_A   VARCHAR2 (100);FSTA_A   VARCHAR2 (100);LMDT_A   VARCHAR2 (100);PSTM_A   VARCHAR2 (100);SPOT_A   VARCHAR2 (100);COUNTS   NUMBER(36);--定义出港信息要修改的除时间外的字段STND_D   VARCHAR2 (100);A_WEATHER_D VARCHAR2 (100);ABNS_D   VARCHAR2 (100);ACFT_D   VARCHAR2 (100);AIRLINE_D VARCHAR2 (100);DLAB_D   VARCHAR2 (100);DNAP_D   VARCHAR2 (100);LMUR_D   VARCHAR2 (100);RENO_D   VARCHAR2 (100);RWAY_D   VARCHAR2 (100);DPRT_D   VARCHAR2 (100);PARK_D   VARCHAR2 (100);INTERNALORINTERNATIONAL_D  VARCHAR2 (100);TERMINAL_D VARCHAR2 (100);GROUNDDISTRIBUTION_D VARCHAR2 (100);--定义进港信息要修改的除时间外的字段ABNS_A   VARCHAR2 (100);ACFT_A   VARCHAR2 (100);AIRLINE_A VARCHAR2 (100);ALAP_A   VARCHAR2 (100);APRT_A   VARCHAR2 (100);CHDT_A   VARCHAR2 (100);RENO_A   VARCHAR2 (100);LMUR_A   VARCHAR2 (100);RWAY_A   VARCHAR2 (100);STND_A   VARCHAR2 (100);PARK_A     VARCHAR2 (100);INTERNALORINTERNATIONAL_A  VARCHAR2 (100);TERMINAL_A VARCHAR2 (100);GROUNDDISTRIBUTION_A VARCHAR2 (100);BEGINSTYP := GetXmlNodeValue (xmlStr, 'STYP');RENO := GetXmlNodeValue (xmlStr, 'RENO');FFID := GetXmlNodeValue (xmlStr, 'FFID');ABNS := GetXmlNodeValue (xmlStr, 'ABNS');ACFT := GetXmlNodeValue (xmlStr, 'ACFT');CHDT := GetXmlNodeValue (xmlStr, 'CHDT');EIBT := GetXmlNodeValue (xmlStr, 'EIBT');FATA := GetXmlNodeValue (xmlStr, 'FATA');FETA := GetXmlNodeValue (xmlStr, 'FETA');FSTA := GetXmlNodeValue (xmlStr, 'FSTA');LMDT := GetXmlNodeValue (xmlStr, 'LMDT');LMUR := GetXmlNodeValue (xmlStr, 'LMUR');PSTM := GetXmlNodeValue (xmlStr, 'PSTM');RWAY := GetXmlNodeValue (xmlStr, 'RWAY');SPOT := GetXmlNodeValue (xmlStr, 'SPOT');STND := GetXmlNodeValue (xmlStr, 'STND');SDEC := GetXmlNodeValue (xmlStr, 'STND');A_TOBT := GetXmlNodeValue (xmlStr, 'A_TOBT');A_WEATHER := GetXmlNodeValue (xmlStr, 'A_WEATHER');ALAP := GetXmlNodeValue (xmlStr, 'ALAP');APRT := GetXmlNodeValue (xmlStr, 'APRT');ASAT := GetXmlNodeValue (xmlStr, 'ASAT');BCTM := GetXmlNodeValue (xmlStr, 'BCTM');BOTM := GetXmlNodeValue (xmlStr, 'BOTM');BETM := GetXmlNodeValue (xmlStr, 'BETM');BSTM := GetXmlNodeValue (xmlStr, 'BSTM');C_TOBT := GetXmlNodeValue (xmlStr, 'C_TOBT');COBT := GetXmlNodeValue (xmlStr, 'COBT');CTOT := GetXmlNodeValue (xmlStr, 'CTOT');DINT := GetXmlNodeValue (xmlStr, 'DINT');DLAB := GetXmlNodeValue (xmlStr, 'DLAB');DNAP := GetXmlNodeValue (xmlStr, 'DNAP');DOUT := GetXmlNodeValue (xmlStr, 'DOUT');EDDI := GetXmlNodeValue (xmlStr, 'EDDI');EOBT := GetXmlNodeValue (xmlStr, 'EOBT');EPGT := GetXmlNodeValue (xmlStr, 'EPGT');EPOT := GetXmlNodeValue (xmlStr, 'EPOT');FATD := GetXmlNodeValue (xmlStr, 'FATD');FSTD := GetXmlNodeValue (xmlStr, 'FSTD');OFTM := GetXmlNodeValue (xmlStr, 'OFTM');STDI := GetXmlNodeValue (xmlStr, 'STDI');TSAT := GetXmlNodeValue (xmlStr, 'TSAT');DPRT := GetXmlNodeValue (xmlStr, 'DPRT');PARK := GetXmlNodeValue (xmlStr, 'PARK');INTERNALORINTERNATIONAL := GetXmlNodeValue (xmlStr, 'INTERNALORINTERNATIONAL');TERMINAL := GetXmlNodeValue (xmlStr, 'TERMINAL');GROUNDDISTRIBUTION := GetXmlNodeValue (xmlStr, 'GROUNDDISTRIBUTION');--出港信息表中时间字段的时间格式函数的用法A_TOBT_D := FORMATDATEVALUE (A_TOBT, 'A_TOBT_D');ASAT_D := FORMATDATEVALUE (ASAT, 'ASAT_D');BCTM_D := FORMATDATEVALUE (BCTM, 'BCTM_D');BOTM_D := FORMATDATEVALUE (BOTM, 'BOTM_D');BETM_D := FORMATDATEVALUE (BETM, 'BETM_D');C_TOBT_D := FORMATDATEVALUE (C_TOBT, 'C_TOBT_D');COBT_D := FORMATDATEVALUE (COBT, 'COBT_D');CTOT_D := FORMATDATEVALUE (CTOT, 'CTOT_D');DINT_D := FORMATDATEVALUE (DINT, 'DINT_D');DOUT_D := FORMATDATEVALUE (DOUT, 'DOUT_D');EDDI_D := FORMATDATEVALUE (EDDI, 'EDDI_D');EOBT_D := FORMATDATEVALUE (EOBT, 'EOBT_D');EPGT_D := FORMATDATEVALUE (EPGT, 'EPGT_D');EPOT_D := FORMATDATEVALUE (EPOT, 'EPOT_D');FATD_D := FORMATDATEVALUE (FATD, 'FATD_D');FSTD_D := FORMATDATEVALUE (FSTD, 'FSTD_D');LMDT_D := FORMATDATEVALUE (LMDT, 'LMDT_D');OFTM_D := FORMATDATEVALUE (OFTM, 'OFTM_D');STDI_D := FORMATDATEVALUE (STDI, 'STDI_D');TSAT_D := FORMATDATEVALUE (TSAT, 'TSAT_D');--进港信息表中时间字段的时间格式函数的用法EIBT_A := FORMATDATEVALUE (EIBT, 'EIBT_A');FATA_A := FORMATDATEVALUE (FATA, 'FATA_A');FETA_A := FORMATDATEVALUE (FETA, 'FETA_A');FSTA_A := FORMATDATEVALUE (FSTA, 'FSTA_A');LMDT_A := FORMATDATEVALUE (LMDT, 'LMDT_A');PSTM_A := FORMATDATEVALUE (PSTM, 'PSTM_A');SPOT_A := FORMATDATEVALUE (SPOT, 'SPOT_A');BSTM_A := FORMATDATEVALUE (BSTM, 'BSTM_A');--出港信息要修改的除时间外的字段STND_D := GetXmlNodeValue (xmlStr, 'STND');A_WEATHER_D := GetXmlNodeValue (xmlStr, 'A_WEATHER');ABNS_D := GetXmlNodeValue (xmlStr, 'ABNS');ACFT_D := GetXmlNodeValue (xmlStr, 'ACFT');AIRLINE_D := GetXmlNodeValue (xmlStr, 'AIRLINE');DLAB_D := GetXmlNodeValue (xmlStr, 'DLAB');DNAP_D := GetXmlNodeValue (xmlStr, 'DNAP');LMUR_D := GetXmlNodeValue (xmlStr, 'LMUR');RENO_D := GetXmlNodeValue (xmlStr, 'RENO');RWAY_D := GetXmlNodeValue (xmlStr, 'RWAY');DPRT_D := GetXmlNodeValue (xmlStr, 'DPRT');PARK_D := GetXmlNodeValue (xmlStr, 'PARK');TERMINAL_D := GetXmlNodeValue (xmlStr, 'TERMINAL');GROUNDDISTRIBUTION_D := GetXmlNodeValue (xmlStr, 'GROUNDDISTRIBUTION');--进港信息要修改的除时间外的字段ABNS_A := GetXmlNodeValue (xmlStr, 'ABNS');ACFT_A := GetXmlNodeValue (xmlStr, 'ACFT');AIRLINE_A := GetXmlNodeValue (xmlStr, 'AIRLINE');ALAP_A := GetXmlNodeValue (xmlStr, 'ALAP');APRT_A := GetXmlNodeValue (xmlStr, 'APRT');CHDT_A := GetXmlNodeValue (xmlStr, 'CHDT');RENO_A := GetXmlNodeValue (xmlStr, 'RENO');LMUR_A := GetXmlNodeValue (xmlStr, 'LMUR');RWAY_A := GetXmlNodeValue (xmlStr, 'RWAY');STND_A := GetXmlNodeValue (xmlStr, 'STND');PARK_A := GetXmlNodeValue (xmlStr, 'PARK');TERMINAL_A := GetXmlNodeValue (xmlStr, 'TERMINAL');GROUNDDISTRIBUTION_A := GetXmlNodeValue (xmlStr, 'GROUNDDISTRIBUTION');IF STYP = 'FGIS' THEN IF INSTR(FFID,'-D-') > 0 THENFFID_D := FFID;--截取航空公司代码AIRLINE := SUBSTR(FFID_D,0,2);--截取航班号FLIGHTNUMBER := SUBSTR(FFID_D,INSTR(FFID_D,'-',1)+1,INSTR(FFID_D,'-',INSTR(FFID_D,'-',1)+1)-INSTR(FFID_D,'-',1)-1);--截取出港标志FLIGHTMARK := SUBSTR(FFID_D,INSTR(FFID_D,'-',2,2)+1,INSTR(FFID_D,'-',2,3)-1-INSTR(FFID_D,'-',2,2));--截取进离港标志INTERNALORINTERNATIONAL := SUBSTR(FFID_D,-1);--UPDATE之前要先根据FFID查询一下看看数据表中是否已经存在该条数据,如果存在就UPDATE,如果不存在就SAVESELECT COUNT(1) INTO COUNTS FROM TB_CMS_FLGTINFO_D where FFID = FFID_D;IF COUNTS > 0 THENIF A_TOBT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET A_TOBT = A_TOBT_D WHERE FFID = FFID_D;END IF;IF A_WEATHER_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET A_WEATHER = A_WEATHER_D WHERE FFID = FFID_D;END IF;IF ABNS_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET ABNS = ABNS_D WHERE FFID = FFID_D;END IF;IF ACFT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET ACFT = ACFT_D WHERE FFID = FFID_D;END IF;IF ASAT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET ASAT = ASAT_D WHERE FFID = FFID_D;END IF;IF BCTM_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET BCTM = BCTM_D WHERE FFID = FFID_D;END IF;IF BOTM_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET BOTM = BOTM_D WHERE FFID = FFID_D;END IF;IF BETM_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET BETM = BETM_D WHERE FFID = FFID_D;END IF;IF C_TOBT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET C_TOBT = C_TOBT_D WHERE FFID = FFID_D;END IF;IF COBT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET COBT = COBT_D WHERE FFID = FFID_D;END IF;IF CTOT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET CTOT = CTOT_D WHERE FFID = FFID_D;END IF;IF DINT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET DINT = DINT_D WHERE FFID = FFID_D;END IF;IF DLAB_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET DLAB = DLAB_D WHERE FFID = FFID_D;END IF;IF DNAP_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET DNAP = DNAP_D WHERE FFID = FFID_D;END IF;IF DOUT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET DOUT = DOUT_D WHERE FFID = FFID_D;END IF;IF EDDI_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET EDDI = EDDI_D WHERE FFID = FFID_D;END IF;IF EOBT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET EOBT = EOBT_D WHERE FFID = FFID_D;END IF;IF EPGT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET EPGT = EPGT_D WHERE FFID = FFID_D;END IF;IF EPOT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET EPOT = EPOT_D WHERE FFID = FFID_D;END IF;IF FATD_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET FATD = FATD_D WHERE FFID = FFID_D;END IF;IF FSTD_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET FSTD = FSTD_D WHERE FFID = FFID_D;END IF;IF LMDT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET LMDT = LMDT_D WHERE FFID = FFID_D;END IF;IF LMUR_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET LMUR = LMUR_D WHERE FFID = FFID_D;END IF;IF OFTM_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET OFTM = OFTM_D WHERE FFID = FFID_D;END IF;IF RENO_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET RENO = RENO_D WHERE FFID = FFID_D;END IF;IF RWAY_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET RWAY = RWAY_D WHERE FFID = FFID_D;END IF;IF STDI_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET STDI = STDI_D WHERE FFID = FFID_D;END IF;IF STND_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET STND = STND_D WHERE FFID = FFID_D;END IF;IF TSAT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET TSAT = TSAT_D WHERE FFID = FFID_D;END IF; IF DPRT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET DPRT = DPRT_D WHERE FFID = FFID_D;END IF; IF PARK_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET PARK = PARK_D WHERE FFID = FFID_D;END IF; IF TERMINAL_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET TERMINAL = TERMINAL_D WHERE FFID = FFID_D;END IF; IF GROUNDDISTRIBUTION_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET GROUNDDISTRIBUTION = GROUNDDISTRIBUTION_D WHERE FFID = FFID_D;END IF; ELSEINSERT INTO TB_CMS_FLGTINFO_D (ID,A_TOBT,A_WEATHER,ABNS,ACFT,AIRLINE,ASAT,BCTM,BOTM,BETM,C_TOBT,COBT,CTOT,DINT,DLAB,DNAP,DOUT,DPRT,EDDI,EOBT,EPGT,EPOT,FATD,FFID,FLIGHTNUMBER,FLIGHTMARK,FSTD,GROUNDDISTRIBUTION,INTERNALORINTERNATIONAL,LMDT,LMUR,OFTM,PARK,RENO,RWAY,STDI,STND,TERMINAL,TSAT)VALUES   (FLGTINFO_D_SEQ.NEXTVAL,A_TOBT_D,A_WEATHER,ABNS,ACFT,AIRLINE,ASAT_D,BCTM_D,BOTM_D,BETM_D,C_TOBT_D,COBT_D,CTOT_D,DINT_D,DLAB,DNAP,DOUT_D,DPRT,EDDI_D,EOBT_D,EPGT_D,EPOT_D,FATD_D,FFID_D,FLIGHTNUMBER,FLIGHTMARK,FSTD_D,GROUNDDISTRIBUTION,INTERNALORINTERNATIONAL,LMDT_D,LMUR,OFTM_D,PARK,RENO,RWAY,STDI_D,STND,TERMINAL,TSAT_D);END IF;ELSEFFID_A := FFID;--截取航空公司代码AIRLINE := SUBSTR(FFID_A,0,2);--截取航班号FLIGHTNUMBER := SUBSTR(FFID_A,INSTR(FFID_A,'-',1)+1,INSTR(FFID_A,'-',INSTR(FFID_A,'-',1)+1)-INSTR(FFID_A,'-',1)-1);--截取出港标志FLIGHTMARK := SUBSTR(FFID_A,INSTR(FFID_A,'-',2,2)+1,INSTR(FFID_A,'-',2,3)-1-INSTR(FFID_A,'-',2,2));--截取进离港标志INTERNALORINTERNATIONAL := SUBSTR(FFID_A,-1);--UPDATE之前要先根据FFID查询一下看看数据表中是否已经存在该条数据,如果存在就UPDATE,如果不存在就SAVESELECT COUNT(1) INTO COUNTS FROM TB_CMS_FLGTINFO_A where FFID = FFID_A;IF COUNTS > 0 THENIF ABNS_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET ABNS = ABNS_A WHERE FFID = FFID_A;END IF;IF ACFT_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET ACFT = ACFT_A WHERE FFID = FFID_A;END IF;IF ALAP_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET ALAP = ALAP_A WHERE FFID = FFID_A;END IF;IF BSTM_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET BSTM = BSTM_A WHERE FFID = FFID_A;END IF;IF CHDT_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET CHDT = CHDT_A WHERE FFID = FFID_A;END IF;IF RENO_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET RENO = RENO_A WHERE FFID = FFID_A;END IF;IF EIBT_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET EIBT = EIBT_A WHERE FFID = FFID_A;END IF;IF FATA_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET FATA = FATA_A WHERE FFID = FFID_A;END IF;IF FETA_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET FETA = FETA_A WHERE FFID = FFID_A;END IF;IF FSTA_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET FSTA = FSTA_A WHERE FFID = FFID_A;END IF;IF LMDT_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET LMDT = LMDT_A WHERE FFID = FFID_A;END IF;IF LMUR_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET LMUR = LMUR_A WHERE FFID = FFID_A;END IF;IF PSTM_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET PSTM = PSTM_A WHERE FFID = FFID_A;END IF;IF RWAY_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET RWAY = RWAY_A WHERE FFID = FFID_A;END IF;IF SPOT_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET SPOT = SPOT_A WHERE FFID = FFID_A;END IF;IF STND_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET STND = STND_A WHERE FFID = FFID_A;END IF;IF APRT_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET APRT = APRT_A WHERE FFID = FFID_A;END IF; IF PARK_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET PARK = PARK_A WHERE FFID = FFID_A;END IF; IF TERMINAL_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET TERMINAL = TERMINAL_A WHERE FFID = FFID_A;END IF; IF GROUNDDISTRIBUTION_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET GROUNDDISTRIBUTION = GROUNDDISTRIBUTION_A WHERE FFID = FFID_A;END IF; ELSEINSERT INTO TB_CMS_FLGTINFO_A (ID,ABNS,ACFT,AIRLINE,ALAP,BSTM,CHDT,APRT,FFID,FLIGHTNUMBER,FLIGHTMARK,GROUNDDISTRIBUTION,INTERNALORINTERNATIONAL,RENO,EIBT,FATA,FETA,FSTA,LMDT,LMUR,PARK,PSTM,RWAY,SPOT,STND,TERMINAL)VALUES   (FLGTINFO_A_SEQ.NEXTVAL,ABNS,ACFT,AIRLINE,ALAP,BSTM_A,CHDT,APRT,FFID_A,FLIGHTNUMBER,FLIGHTMARK,GROUNDDISTRIBUTION,INTERNALORINTERNATIONAL,RENO,EIBT_A,FATA_A,FETA_A,FSTA_A,LMDT_A,LMUR,PARK,PSTM_A,RWAY,SPOT_A,STND,TERMINAL);END IF;END IF;ELSEIF INSTR(FFID,'-D-') > 0 THENFFID_D := FFID;--截取航空公司代码AIRLINE := SUBSTR(FFID_D,0,2);--截取航班号FLIGHTNUMBER := SUBSTR(FFID_D,INSTR(FFID_D,'-',1)+1,INSTR(FFID_D,'-',INSTR(FFID_D,'-',1)+1)-INSTR(FFID_D,'-',1)-1);--截取出港标志FLIGHTMARK := SUBSTR(FFID_D,INSTR(FFID_D,'-',2,2)+1,INSTR(FFID_D,'-',2,3)-1-INSTR(FFID_D,'-',2,2));--截取进离港标志INTERNALORINTERNATIONAL := SUBSTR(FFID_D,-1);--UPDATE之前要先根据FFID查询一下看看数据表中是否已经存在该条数据,如果存在就UPDATE,如果不存在就SAVESELECT COUNT(1) INTO COUNTS FROM TB_CMS_FLGTINFO_D where FFID = FFID_D;IF COUNTS > 0 THENIF A_TOBT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET A_TOBT = A_TOBT_D WHERE FFID = FFID_D;END IF;IF A_WEATHER_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET A_WEATHER = A_WEATHER_D WHERE FFID = FFID_D;END IF;IF ABNS_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET ABNS = ABNS_D WHERE FFID = FFID_D;END IF;IF ACFT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET ACFT = ACFT_D WHERE FFID = FFID_D;END IF;IF ASAT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET ASAT = ASAT_D WHERE FFID = FFID_D;END IF;IF BCTM_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET BCTM = BCTM_D WHERE FFID = FFID_D;END IF;IF BOTM_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET BOTM = BOTM_D WHERE FFID = FFID_D;END IF;IF BETM_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET BETM = BETM_D WHERE FFID = FFID_D;END IF;IF C_TOBT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET C_TOBT = C_TOBT_D WHERE FFID = FFID_D;END IF;IF COBT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET COBT = COBT_D WHERE FFID = FFID_D;END IF;IF CTOT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET CTOT = CTOT_D WHERE FFID = FFID_D;END IF;IF DINT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET DINT = DINT_D WHERE FFID = FFID_D;END IF;IF DLAB_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET DLAB = DLAB_D WHERE FFID = FFID_D;END IF;IF DNAP_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET DNAP = DNAP_D WHERE FFID = FFID_D;END IF;IF DOUT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET DOUT = DOUT_D WHERE FFID = FFID_D;END IF;IF EDDI_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET EDDI = EDDI_D WHERE FFID = FFID_D;END IF;IF EOBT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET EOBT = EOBT_D WHERE FFID = FFID_D;END IF;IF EPGT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET EPGT = EPGT_D WHERE FFID = FFID_D;END IF;IF EPOT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET EPOT = EPOT_D WHERE FFID = FFID_D;END IF;IF FATD_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET FATD = FATD_D WHERE FFID = FFID_D;END IF;IF FSTD_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET FSTD = FSTD_D WHERE FFID = FFID_D;END IF;IF LMDT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET LMDT = LMDT_D WHERE FFID = FFID_D;END IF;IF LMUR_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET LMUR = LMUR_D WHERE FFID = FFID_D;END IF;IF OFTM_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET OFTM = OFTM_D WHERE FFID = FFID_D;END IF;IF RENO_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET RENO = RENO_D WHERE FFID = FFID_D;END IF;IF RWAY_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET RWAY = RWAY_D WHERE FFID = FFID_D;END IF;IF STDI_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET STDI = STDI_D WHERE FFID = FFID_D;END IF;IF SDEC != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET SDEC = SDEC WHERE FFID = FFID_D;END IF;IF TSAT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET TSAT = TSAT_D WHERE FFID = FFID_D;END IF; IF DPRT_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET DPRT = DPRT_D WHERE FFID = FFID_D;END IF; IF PARK_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET PARK = PARK_D WHERE FFID = FFID_D;END IF; IF TERMINAL_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET TERMINAL = TERMINAL_D WHERE FFID = FFID_D;END IF; IF GROUNDDISTRIBUTION_D != ' ' THENUPDATE TB_CMS_FLGTINFO_D SET GROUNDDISTRIBUTION = GROUNDDISTRIBUTION_D WHERE FFID = FFID_D;END IF; ELSEINSERT INTO TB_CMS_FLGTINFO_D (ID,A_TOBT,A_WEATHER,ABNS,ACFT,AIRLINE,ASAT,BCTM,BOTM,BETM,C_TOBT,COBT,CTOT,DINT,DLAB,DNAP,DOUT,DPRT,EDDI,EOBT,EPGT,EPOT,FATD,FFID,FLIGHTNUMBER,FLIGHTMARK,FSTD,GROUNDDISTRIBUTION,INTERNALORINTERNATIONAL,LMDT,LMUR,OFTM,PARK,RENO,RWAY,STDI,SDEC,TERMINAL,TSAT)VALUES   (FLGTINFO_D_SEQ.NEXTVAL,A_TOBT_D,A_WEATHER,ABNS,ACFT,AIRLINE,ASAT_D,BCTM_D,BOTM_D,BETM_D,C_TOBT_D,COBT_D,CTOT_D,DINT_D,DLAB,DNAP,DOUT_D,DPRT,EDDI_D,EOBT_D,EPGT_D,EPOT_D,FATD_D,FFID_D,FLIGHTNUMBER,FLIGHTMARK,FSTD_D,GROUNDDISTRIBUTION,INTERNALORINTERNATIONAL,LMDT_D,LMUR,OFTM_D,PARK,RENO,RWAY,STDI_D,SDEC,TERMINAL,TSAT_D);END IF;ELSEFFID_A := FFID;--截取航空公司代码AIRLINE := SUBSTR(FFID_A,0,2);--截取航班号FLIGHTNUMBER := SUBSTR(FFID_A,INSTR(FFID_A,'-',1)+1,INSTR(FFID_A,'-',INSTR(FFID_A,'-',1)+1)-INSTR(FFID_A,'-',1)-1);--截取出港标志FLIGHTMARK := SUBSTR(FFID_A,INSTR(FFID_A,'-',2,2)+1,INSTR(FFID_A,'-',2,3)-1-INSTR(FFID_A,'-',2,2));--截取进离港标志INTERNALORINTERNATIONAL := SUBSTR(FFID_A,-1);--UPDATE之前要先根据FFID查询一下看看数据表中是否已经存在该条数据,如果存在就UPDATE,如果不存在就SAVESELECT COUNT(1) INTO COUNTS FROM TB_CMS_FLGTINFO_A where FFID = FFID_A;IF COUNTS > 0 THENIF ABNS_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET ABNS = ABNS_A WHERE FFID = FFID_A;END IF;IF ACFT_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET ACFT = ACFT_A WHERE FFID = FFID_A;END IF;IF ALAP_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET ALAP = ALAP_A WHERE FFID = FFID_A;END IF;IF BSTM_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET BSTM = BSTM_A WHERE FFID = FFID_A;END IF;IF CHDT_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET CHDT = CHDT_A WHERE FFID = FFID_A;END IF;IF RENO_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET RENO = RENO_A WHERE FFID = FFID_A;END IF;IF EIBT_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET EIBT = EIBT_A WHERE FFID = FFID_A;END IF;IF FATA_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET FATA = FATA_A WHERE FFID = FFID_A;END IF;IF FETA_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET FETA = FETA_A WHERE FFID = FFID_A;END IF;IF FSTA_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET FSTA = FSTA_A WHERE FFID = FFID_A;END IF;IF LMDT_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET LMDT = LMDT_A WHERE FFID = FFID_A;END IF;IF LMUR_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET LMUR = LMUR_A WHERE FFID = FFID_A;END IF;IF PSTM_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET PSTM = PSTM_A WHERE FFID = FFID_A;END IF;IF RWAY_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET RWAY = RWAY_A WHERE FFID = FFID_A;END IF;IF SPOT_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET SPOT = SPOT_A WHERE FFID = FFID_A;END IF;IF STND_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET STND = STND_A WHERE FFID = FFID_A;END IF;IF APRT_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET APRT = APRT_A WHERE FFID = FFID_A;END IF; IF PARK_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET PARK = PARK_A WHERE FFID = FFID_A;END IF; IF TERMINAL_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET TERMINAL = TERMINAL_A WHERE FFID = FFID_A;END IF; IF GROUNDDISTRIBUTION_A != ' ' THENUPDATE TB_CMS_FLGTINFO_A SET GROUNDDISTRIBUTION = GROUNDDISTRIBUTION_A WHERE FFID = FFID_A;END IF; ELSEINSERT INTO TB_CMS_FLGTINFO_A (ID,ABNS,ACFT,AIRLINE,ALAP,BSTM,CHDT,APRT,FFID,FLIGHTNUMBER,FLIGHTMARK,GROUNDDISTRIBUTION,INTERNALORINTERNATIONAL,RENO,EIBT,FATA,FETA,FSTA,LMDT,LMUR,PARK,PSTM,RWAY,SPOT,STND,TERMINAL)VALUES   (FLGTINFO_A_SEQ.NEXTVAL,ABNS,ACFT,AIRLINE,ALAP,BSTM_A,CHDT,APRT,FFID_A,FLIGHTNUMBER,FLIGHTMARK,GROUNDDISTRIBUTION,INTERNALORINTERNATIONAL,RENO,EIBT_A,FATA_A,FETA_A,FSTA_A,LMDT_A,LMUR,PARK,PSTM_A,RWAY,SPOT_A,STND,TERMINAL);END IF;END IF;END IF;COMMIT;EXCEPTIONWHEN OTHERS THENDBMS_OUTPUT.PUT_LINE (SQLERRM);END MIP_PARSE;
/

五:存储过程里面用到的Function.SQL:

CREATE OR REPLACE FUNCTION MIP.FormatDateValue (key VARCHAR2, value VARCHAR2)RETURN VARCHAR2
IS--定义几个变量,出来解析过来的时间字符串--日月年时分(11OCT141024)Str      VARCHAR2(32);AA       VARCHAR2(32);DAY      VARCHAR2(32);MOUNTH   VARCHAR2(32);YEAR     VARCHAR2(32);HOUR     VARCHAR2(32);MINUTE   VARCHAR2(32);ValueReturn   VARCHAR2 (64);BEGINIF key != ' ' THENDAY := SUBSTR(key,0,2);MOUNTH := SUBSTR(key,3,3);IF INSTR (MOUNTH,'JAN') > 0 THENMOUNTH := 01;END IF;IF INSTR (MOUNTH,'FEB') > 0 THENMOUNTH := 02;END IF;IF INSTR (MOUNTH,'MAR') > 0 THENMOUNTH := 03;END IF;IF INSTR (MOUNTH,'APR') > 0 THENMOUNTH := 04;END IF;IF INSTR (MOUNTH,'MAY') > 0 THENMOUNTH := 05;END IF;IF INSTR (MOUNTH,'JUN') > 0 THENMOUNTH := 06;END IF;IF INSTR (MOUNTH,'JUL') > 0 THENMOUNTH := 07;END IF;IF INSTR (MOUNTH,'AUG') > 0 THENMOUNTH := 08;END IF;IF INSTR (MOUNTH,'SEP') > 0 THENMOUNTH := 09;END IF;IF INSTR (MOUNTH,'OCT') > 0 THENMOUNTH := 10;END IF;IF INSTR (MOUNTH,'NOV') > 0 THENMOUNTH := 11;END IF;IF INSTR (MOUNTH,'DEC') > 0 THENMOUNTH := 12;END IF;YEAR := SUBSTR(key,6,2);HOUR := SUBSTR(key,8,2);MINUTE := SUBSTR(key,-2);AA := 20;Str := 0;--日月年时分(11OCT141017)IF length(MOUNTH) < 2 THENMOUNTH := Str||MOUNTH;ValueReturn := AA || YEAR || '-' || MOUNTH || '-' || DAY || ' ' || HOUR || ':' || MINUTE;ELSEValueReturn := AA || YEAR || '-' || MOUNTH || '-' || DAY || ' ' || HOUR || ':' || MINUTE;END IF;--ValueReturn := HOUR || ':' || MINUTE;RETURN ValueReturn;ELSEValueReturn := ' ';RETURN ValueReturn;END IF;END FormatDateValue;
/

CREATE OR REPLACE FUNCTION MIP.GetXmlNodeValue (xmlStr CLOB, nodeName VARCHAR2)RETURN VARCHAR2
IS--创建xml解析器实例xmlparser.ParserxmlPar        xmlparser.Parser := xmlparser.newParser;--定义DOM文档xDoc          xmldom.DOMDocument;--定义item子节点数目变量lenItme       INTEGER;--定义节点列表,存放item节点们itemNodes     xmldom.DOMNodeList;--定义节点,存放单个item节点itemNode      xmldom.DOMNode;ValueReturn   VARCHAR2 (100);BEGIN--解析xmlStr中xml字符串,并存放到xmlPar中xmlparser.parseClob (xmlPar, xmlStr);--将xmlPar中的数据转存到dom文档中xDoc := xmlparser.getDocument (xmlPar);--释放解析器实例xmlparser.freeParser (xmlPar);--获取所有item节点itemNodes := xmldom.getElementsByTagName (xDoc, nodeName);--获取item节点的个数lenItme := xmldom.getLength (itemNodes);--如果无该标签,则返回EMPTYIF lenItme = 0 THENValueReturn := ' ';ELSE--获取节点列表中的第1个item节点itemNode := xmldom.item (itemNodes, 0);--获取所有子节点的值ValueReturn := xmldom.getNodeValue (xmldom.getFirstChild (itemNode));END IF;   --释放domxmldom.freeDocument(xDoc);RETURN ValueReturn;END GetXmlNodeValue;
/


六:最后是调用存储过程执行解析Clob字段里面的xml字符串的游标SQL:

/* Formatted on 2015/1/15 14:20:27 (QP5 v5.115.810.9015) */
DECLARE--定义游标CURSOR c_cursorIS--这里查询指定时间内的数据,根据时间判断一下id>那个编号开始SELECT MBINMSGS_CLOB_MSG FROM MBINMSGS_TEMP;v_MBINMSGS_CLOB_MSG   MBINMSGS_TEMP.MBINMSGS_CLOB_MSG%TYPE;
BEGIN--打开游标OPEN c_cursor;--提取游标数据FETCH c_cursor INTO   v_MBINMSGS_CLOB_MSG;WHILE c_cursor%FOUNDLOOPDBMS_OUTPUT.put_line (v_MBINMSGS_CLOB_MSG);FETCH c_cursor INTO   v_MBINMSGS_CLOB_MSG;MIP_PARSE(v_MBINMSGS_CLOB_MSG);END LOOP;
END;

总结:以上所以的SQL操作都是在PL/SQL中完成的,这样执行完成后的结果就是把零时表里面的所有的CLOB字段里面的xml解析并更新到对应的数据表中。


本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/443444.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Linux 下安装 jdk-7u75-linux-x64.gz,jdk1.7.0_75,jdk1.7步骤:

摘要&#xff1a;近来又用到了Linux系统&#xff0c;所以就又新装了一个虚拟机和CentOS 6.4来用&#xff0c;搞开发的程序猿们可能都知道&#xff0c;在现在的很多企业中&#xff0c;生产环境大多都是Linux服务器&#xff0c;并且用的比较多的大都是CentOS&#xff0c;Red hat系…

Linux下配置OpenLDAP服务记录

摘要&#xff1a;最近部门需要整合所有的系统&#xff0c;所以领导说要通过OpenLdap数据库来实现对所有系统的统一管理&#xff0c;所以需要在服务器上配置一下LDAP服务&#xff0c;我们这里选择的是OpenLdap服务&#xff0c;我在网上搜索了很多&#xff0c;开始都没有配置成功…

Maven配置nexus

摘要&#xff1a;近来一直在搭建maven结构的开发框架&#xff0c;其中这个过程中用到了nexus私服&#xff0c;这里我把我经过查询总结的最终的方式记录一下&#xff0c;以便后面忘记了&#xff1a; 一&#xff1a;nexus私服的安装(略) 二&#xff1a;仓库的讲解如下图: 1、ho…

Maven项目发布的配置

摘要&#xff1a;要想发布maven结构的项目到nexus私服上&#xff0c;可以通过两种方式来&#xff0c;一种是在项目的pom.xml文件里面配置&#xff0c;另一种是通过命令的方式发布到nexus私服上&#xff0c;但是这种方式的前提也得在settings.xml文件配置用户: 一&#xff1a;M…

MariaDB通过命令行的方式导出指定数据库和还原指定数据库

摘要&#xff1a;今天由于需要需要从本地导出一份VP系统的数据库脚本&#xff0c;以前我都是通过工具直接导出&#xff0c;现在有同事说可以通过mysql的命令方式导出&#xff0c;我试了一下&#xff0c;可以&#xff0c;现在记录一下&#xff01; 一&#xff1a;在MariaDB的安装…

Maven中maven-source-plugin,maven-javadoc-plugin插件的使用:

摘要&#xff1a;今天领导说要把项目通过maven生产源码包和文档包并发布到自己的私服上&#xff0c;经过查看mavne官网发现有两个maven插件可以做到这些工作&#xff0c;一个是maven-source-plugin&#xff0c;另一个是maven-javadoc-plugin&#xff0c;现在记录一下&#xff0…

Maven之生成测试覆盖度的插件cobertura-maven-plugin的使用

摘要&#xff1a;Maven中可以通过使用插件检查一个项目的测试代码的覆盖度&#xff0c;这个插件就是cobertura-maven-plugin&#xff0c;这个插件如何使用我做了测试&#xff0c;现在记录一下&#xff01; 一&#xff1a;首先在你的项目的pom.xml文件中增加该插件的配置&#x…

Linux下开启mysql数据库的远程访问权限

摘要&#xff1a;今天在Linux服务器上安装了msyql数据库&#xff0c;在本地访问的时候可以访问&#xff0c;但是我想通过远程的方式访问的时候就不能访问了&#xff0c;查询资料后发现&#xff0c;Linux下mysql默认安装完成后只有本地访问的权限&#xff0c;没有远程访问的权限…

Maven之搭建本地私服(nexus)仓库

摘要&#xff1a;现在越来越多的项目都在使用Maven管理项目&#xff0c;尤其是在大型的项目团队中使用Maven能带来更加多的好处&#xff0c;私服的好处我相信大家都明白&#xff0c;在这里我就不多说了&#xff0c;它最重要的作用就是可以让项目团队成员更加方便的下载对应的项…

项目管理4321方法论

文章目录 一、项目立项准备&#xff08;4步&#xff09;case1、识别价值---解决背后痛点的才是价值&#xff0c;价值是做任何事情的出发点case2、明确目标---支撑价值实现的&#xff0c;目标是 具体/可衡量/可达到/相关性/有时限的case3、识别干系人---找对人才能做对事&#x…

Maven之自定义archetype生成项目骨架(一)

摘要&#xff1a;使用过Maven的人都知道maven中有许多功能都是通过插件来提供的&#xff0c;今天我们来说一下其中的一个插件&#xff1a;maven-archetype-plugin&#xff0c;通过该插件可以自定义符合我们自己需求的archetype。 一:什么是Archetype 总之&#xff0c;原型是一…

Hessian Binary Web Service Protocol远程接口调用入门

摘要&#xff1a;Hessian是一个轻量级的remoting onhttp工具&#xff0c;使用简单的方法提供了RMI的功能. 相比WebService&#xff0c;Hessian更简单、快捷。采用的是二进制RPC协议&#xff0c;因为采用的是二进制协议&#xff0c;所以它很适合于发送二进制数据。 hessian类似于…

Windows+Nginx+Tomcat搭建负载均衡和集群环境同时实现session共享(一)

摘要&#xff1a;随着网站的访问量越来越多&#xff0c;所以就考虑给网站增加服务器了&#xff0c;现在比较流行的做法就是给网站做集群环境&#xff0c;下面我把我做的过程记录一下&#xff0c;方便日后查看&#xff0c;同时也希望可以帮助到有需要的朋友&#xff01; 一&…

Eclipse,MyEclipse 安装SVN插件

摘要&#xff1a;MyEclipse10.5安装SVN插件最简单的方式&#xff1a; 一&#xff1a;先到SVN官网下载对应版本的SVN插件包&#xff0c;我这里下载的site-1.10.10版本 下载地址&#xff1a;http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID2240 二&#xf…

MyEclipse 10.5 安装SVN插件

摘要&#xff1a;MyEclipse10.5安装SVN插件最简单的方式&#xff1a; 一&#xff1a;先到SVN官网下载对应版本的SVN插件包&#xff0c;我这里下载的site-1.10.10版本 下载地址&#xff1a;http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID2240 二&#xf…

PHP获取服务器端的相关信息

摘要&#xff1a;PHP获取服务端端的相关信息 一&#xff1a;代码&#xff1a; <!DOCTYPE html> <html> <head><title>第一个PHP程序(获取服务器信息)</title><meta http-equiv"content-type" content"text/html"; charse…

Spring+Hibernate+SpringMVC+MySql实现配置多个数据源!

摘要&#xff1a;在日常的工作中&#xff0c;很多时候我们进行项目开发的时候&#xff0c;一个项目有可能不止用到一个数据源&#xff0c;为了提高数据库的水平伸缩性&#xff0c;需要对多个数据库实例进行管理&#xff0c;需要配置多数据源! 一&#xff1a;代码截图&#xff…

CentOS下安装Memcached,Linux下安装Memcached,centos下安装memcached,linux下安装memcached...

摘要&#xff1a;最近在看《大型分布式网站架构设计与实践》这本书&#xff0c;把其中的学习过程记录一下&#xff0c;以便日后复习。 一&#xff1a;Memcached简单介绍和描述&#xff1a; Memcached 是一个高性能的分布式内存对象缓存系统&#xff0c;用于动态Web应用以减轻数…

一个微信公众号接入另一个微信公众号的内容

摘要&#xff1a;近日来了这么一个需求&#xff0c;就是客户想在他们的微信公众号里面直接接入我们微信公众号的文章&#xff0c;于是我便开始baidu&#xff0c;google&#xff0c;最后发现了一个新的搜索引擎&#xff1a;“搜狗微信搜索”&#xff0c;该搜索引擎是最近才上线的…

SQL Server将数据库中的表复制到另一个数据库

在使用SqlServer的过程中&#xff0c;我们可能需要将表从一个数据库复制到另一个数据库中&#xff0c;今天&#xff0c;小编为大家介绍这种操作的具体方法及步骤。 一&#xff1a;复制表结构&#xff1a; 1.首先&#xff0c;打开并连接Sql Server&#xff0c;在源数据库Sourc…