存储过程系列五:完整的存储过程备份使用函数REPLACE()substr()
CREATE OR REPLACE PROCEDURE "YLQXSCXKESL_GGXKZ_TO_QB" (
xkzbh_idIn in varchar2,
bgid_idIn in varchar2,
fzrqIn in varchar2,
yxqzIn in varchar2,
flag out varchar2) is
v_raise EXCEPTION ;
V_sqid_q VARCHAR2(32);
V_sqid_h VARCHAR2(32);
V_xkzbh VARCHAR2(100);
V_qbid VARCHAR2(32);
V_fzrqIn VARCHAR2(8);
V_yxqzIn VARCHAR2(8);
V_QYMC INTEGER;
V_ZS INTEGER;
-- V_ryxx INTEGER; --人员信息
--V_FDDBR INTEGER;
--V_QYFZR INTEGER;
V_ryxx1 INTEGER; --法定代表人人员信息
V_ryxx2 INTEGER; --企业负责人人员信息
V_SCFW INTEGER;
-- V_QYSCDZ INTEGER;
V_QYSCDZ1 INTEGER; -- SCDZFWZXBG
V_QYSCDZ2 INTEGER; -- SCDZWZXBG
-- V_SCCP INTEGER;
V_SCCP1 INTEGER;-- JSSCCP
V_SCCP2 INTEGER;-- ZJSSCCP
V_BS INTEGER; -- 0 长流程
-- 1 短流程
V_FRXGZM INTEGER;
V_FZRXGZM INTEGER;
V_length INTEGER; -- 求长度
V_name2 VARCHAR2(100); -- 用于存储替换后的字段信息
begin
----------------更新------医疗器械生产许可证-----------真实数据 状态------结束--------------
select t.sqid into V_sqid_q from gg_xkz_ylqxscxkesl t where xkzbh = xkzbh_idIn and czzt = 'V' and xkzzt = '0'; -- 查询出许可证表中 元数据为V的状态的ID V_xkzid_q 表示原来的ID
select t.sqid into V_sqid_h from gg_xkz_ylqxscxkesl t where xkzbh = xkzbh_idIn and czzt = 'T' and xkzzt = '0' and sqid = bgid_idIn; -- 查询出许可证表中 元数据为T的状态的ID V_xkzid_h 表示插入后的ID
select fzrqIn into V_fzrqIn from dual;
select yxqzIn into V_yxqzIn from dual;
-- 定义变更变量
select 0 into V_BS from dual;
update GG_XKZ_YLQXSCXKESL set DZRQ=to_char(sysdate, 'yyyyMMdd') where sqid=V_sqid_h;
-- select t.xkzbh into V_xkzbh from gg_xkz_ylqxscxkesl t where xkzbh = xkzbh_idIn and czzt = 'V' and xkzzt = '0'; -- 查询出许可证表中 元数据为V的状态的ID V_xkzid_q 表示原来的ID
select t.xkzbh into V_xkzbh from gg_xkz_ylqxscxkesl t where xkzbh = xkzbh_idIn and czzt = 'V'; -- 查询出许可证表中 许可证编号作为唯一条件
update gg_xkz_ylqxscxkesl set czzt = 'I' where sqid = V_sqid_q and czzt = 'V' ;
update gg_xkz_ylqxscxkesl set czzt = 'V' where sqid = V_sqid_h and czzt = 'T' ;
-- 根据修改证面信息 更新人员法定代表人和企业负责人(后加)
--判断法人是否被修改
select count(1) into V_FRXGZM from GG_XKZ_YLQXSCXKESL_RYXX r where r.xm=(
select g.fddbr from GG_XKZ_YLQXSCXKESL g where g.sqid = V_sqid_h
) and r.sqid = V_sqid_h and r.rylx = '0';
--判断负责人是否被修改
select count(1) into V_FZRXGZM from GG_XKZ_YLQXSCXKESL_RYXX r where r.xm=(
select g.qyfzr from GG_XKZ_YLQXSCXKESL g where g.sqid = V_sqid_h
) and r.sqid = V_sqid_h and r.rylx = '1';
if V_FRXGZM = 0 then
update GG_XKZ_YLQXSCXKESL_RYXX set XM = ( select FDDBR from GG_XKZ_YLQXSCXKESL where sqid = V_sqid_h ) where sqid = V_sqid_h and rylx = '0' ;
end if;
if V_FZRXGZM = 0 then
update GG_XKZ_YLQXSCXKESL_RYXX set XM = ( select QYFZR from GG_XKZ_YLQXSCXKESL where sqid = V_sqid_h ) where sqid = V_sqid_h and rylx = '1' ;
end if;
----------------更新------医疗器械生产许可证-----------真实数据 状态--------结束-------------
----------------插入------医疗器械生产许可信息全表------------------开始-------------
-- 查询出全表ID 根据xkzbh 字段查出全表ID 用于操作子表
-- select qbid into V_qbid from xzxk_ylqxscxkesl_xx_qb qb where qb.xkzbh = V_xkzbh and czzt = 'V';
select qbid into V_qbid from xzxk_ylqxscxkesl_xx_qb qb where qb.xkzbh = V_xkzbh ;
SELECT COUNT(t.SQBGSXDM)
into V_QYMC
FROM XZXK_YLQXSCXKESL_BG_SX t
where t.SQBGSXDM = 'QYMC'
AND t.sqid = bgid_idIn;
SELECT COUNT(t.SQBGSXDM)
into V_ZS
FROM XZXK_YLQXSCXKESL_BG_SX t
where t.SQBGSXDM = 'ZS'
AND t.sqid = bgid_idIn;
SELECT COUNT(t.SQBGSXDM)
into V_ryxx1
FROM XZXK_YLQXSCXKESL_BG_SX t
where t.SQBGSXDM = 'FDDBR'
AND t.sqid = bgid_idIn;
SELECT COUNT(t.SQBGSXDM)
into V_ryxx2
FROM XZXK_YLQXSCXKESL_BG_SX t
where t.SQBGSXDM = 'QYFZR'
AND t.sqid = bgid_idIn;
SELECT COUNT(t.SQBGSXDM)
into V_SCFW
FROM XZXK_YLQXSCXKESL_BG_SX t
where t.SQBGSXDM = 'SCFW'
AND t.sqid = bgid_idIn;
SELECT COUNT(t.SQBGSXDM)
into V_QYSCDZ1
FROM XZXK_YLQXSCXKESL_BG_SX t
where t.SQBGSXDM = 'SCDZFWZXBG'
AND t.sqid = bgid_idIn; -- 长
SELECT COUNT(t.SQBGSXDM)
into V_QYSCDZ2
FROM XZXK_YLQXSCXKESL_BG_SX t
where t.SQBGSXDM = 'SCDZWZXBG' -- 短
AND t.sqid = bgid_idIn;
SELECT COUNT(t.SQBGSXDM)
into V_SCCP1
FROM XZXK_YLQXSCXKESL_BG_SX t
where t.SQBGSXDM = 'JSSCCP' -- 短
AND t.sqid = bgid_idIn;
SELECT COUNT(t.SQBGSXDM)
into V_SCCP2
FROM XZXK_YLQXSCXKESL_BG_SX t
where t.SQBGSXDM = 'ZJSCCP' --长
AND t.sqid = bgid_idIn;
-- 更新全表信息
-- 更新企业名称
if V_QYMC > 0 then
update xzxk_ylqxscxkesl_xx_qb
set( qymc , sqid ) =
( select qymc, bgid_idIn from GG_XKZ_YLQXSCXKESL where sqid = V_sqid_h and czzt = 'V')
where qbid = V_qbid ;
select 1 into V_BS from dual ;
else
update xzxk_ylqxscxkesl_xx_qb set sqid = V_sqid_h where QBID = V_qbid ;
end if;
-- where xkzbh = V_xkzbh;
--更新全表住所
SELECT COUNT(t.SQBGSXDM)
into V_ZS
FROM XZXK_YLQXSCXKESL_BG_SX t
where t.SQBGSXDM = 'ZS'
AND t.sqid = V_sqid_h;
if V_ZS>0 then
update xzxk_ylqxscxkesl_xx_qb
set (ZSDZQX, ZSDZJD, ZSDZ, ZSYB, ZSDH) =
(select ZSQX, ZSJD, ZSDZ, ZSYB, ZSDH
from xzxk_ylqxscxkesl_bg_zs z
where z.sqid = V_sqid_h and z.bgqhbs='2') where qbid = V_qbid ;
select 1 into V_BS from dual ;
end if;
--更新全表生产范围
SELECT COUNT(t.SQBGSXDM)
into V_SCFW
FROM XZXK_YLQXSCXKESL_BG_SX t
where t.SQBGSXDM = 'SCFW'
AND t.sqid = V_sqid_h;
if V_SCFW > 0 then
update xzxk_ylqxscxkesl_xx_qb
set SCFW =
(select SCFW from xzxk_ylqxscxkesl_bg_sq z where z.sqid = V_sqid_h) where qbid = V_qbid ;
select 1 into V_BS from dual ;
end if;
--更新生产地址 -- 长流程V_BS 不赋值
SELECT COUNT(t.SQBGSXDM)
into V_QYSCDZ1
FROM XZXK_YLQXSCXKESL_BG_SX t
where ( t.SQBGSXDM = 'SCDZFWZXBG')
AND t.sqid = V_sqid_h;
if V_QYSCDZ1 > 0 then
update xzxk_ylqxscxkesl_xx_qb
set (SCDZ, SCDZYB, SCDZDH) =
(select wm_concat(JTDZ), wm_concat(YB), wm_concat(LXDH)
from xzxk_ylqxscxkesl_bg_scdz z
where z.sqid = V_sqid_h and z.bgqhbs = '2') where qbid = V_qbid ;
end if;
SELECT COUNT(t.SQBGSXDM)
into V_QYSCDZ2
FROM XZXK_YLQXSCXKESL_BG_SX t
where ( t.SQBGSXDM = 'SCDZWZXBG')
AND t.sqid = V_sqid_h;
if V_QYSCDZ2 > 0 then
update xzxk_ylqxscxkesl_xx_qb
set (SCDZ, SCDZYB, SCDZDH) =
(select wm_concat(JTDZ), wm_concat(YB), wm_concat(LXDH)
from xzxk_ylqxscxkesl_bg_scdz z
where z.sqid = V_sqid_h and z.bgqhbs = '2') where qbid = V_qbid ;
select 1 into V_BS from dual ;
end if;
--1.1.2 住所
if V_ZS > 0 then
INSERT INTO PUB_TABLE_DATA_DELEXC(ID, TABLENAME, TABLEPKNAME, TABLEPK, DELFLAG, INSTNUM, LASTDATE, DATEXC)
select sys_guid(), 'XZXK_YLQXSCXKESL_XX_ZS', 'BZJ', BZJ as TABLEPK, 'N', f_getslbs(), sysdate, '11' from XZXK_YLQXSCXKESL_XX_ZS where qbid = V_qbid;
delete XZXK_YLQXSCXKESL_XX_ZS where qbid = V_qbid;
insert into XZXK_YLQXSCXKESL_XX_ZS
(bzj, QBID, sqid, zsqx, zsjd, zsdz, zsyb, zsdh, instnum, lastdate, datexc)
select
sys_guid(), V_qbid, sqid, zsqx, zsjd, zsdz, zsyb, zsdh, f_getslbs(),sysdate,'11'
from GG_XKZ_YLQXSCXKESL_ZS
where sqid = V_sqid_h ;
select 1 into V_BS from dual ;
else
update XZXK_YLQXSCXKESL_XX_ZS set sqid = V_sqid_h where QBID = V_qbid ;
end if;
--1.1.3 人员信息
if V_ryxx1 > 0 then
INSERT INTO PUB_TABLE_DATA_DELEXC(ID, TABLENAME, TABLEPKNAME, TABLEPK, DELFLAG, INSTNUM, LASTDATE, DATEXC)
select sys_guid(), 'XZXK_YLQXSCXKESL_XX_RYXX', 'BZJ', BZJ as TABLEPK, 'N', f_getslbs(), sysdate, '11' from XZXK_YLQXSCXKESL_XX_RYXX where qbid = V_qbid;
delete XZXK_YLQXSCXKESL_XX_RYXX where qbid = V_qbid and rylx = '0';
insert into XZXK_YLQXSCXKESL_XX_RYXX
(bzj, QBID, sqid, rylx, xm, zjlx, zjhm, zc, zw, xl, instnum, lastdate, datexc)
select
sys_guid(), V_qbid, sqid, rylx, xm, zjlx, zjhm, zc, zw, xl, f_getslbs(),sysdate,'11'
from GG_XKZ_YLQXSCXKESL_RYXX
where sqid = V_sqid_h and rylx = '0';
select 1 into V_BS from dual ;
else
update XZXK_YLQXSCXKESL_XX_RYXX set sqid = V_sqid_h where QBID = V_qbid and rylx = '0';
end if;
if V_ryxx2 > 0 then
INSERT INTO PUB_TABLE_DATA_DELEXC(ID, TABLENAME, TABLEPKNAME, TABLEPK, DELFLAG, INSTNUM, LASTDATE, DATEXC)
select sys_guid(), 'XZXK_YLQXSCXKESL_XX_RYXX', 'BZJ', BZJ as TABLEPK, 'N', f_getslbs(), sysdate, '11' from XZXK_YLQXSCXKESL_XX_RYXX where qbid = V_qbid;
delete XZXK_YLQXSCXKESL_XX_RYXX where qbid = V_qbid and rylx = '1';
insert into XZXK_YLQXSCXKESL_XX_RYXX
(bzj, QBID, sqid, rylx, xm, zjlx, zjhm, zc, zw, xl, instnum, lastdate, datexc)
select
sys_guid(), V_qbid, sqid, rylx, xm, zjlx, zjhm, zc, zw, xl, f_getslbs(),sysdate,'11'
from GG_XKZ_YLQXSCXKESL_RYXX
where sqid = V_sqid_h and rylx = '1';
select 1 into V_BS from dual ;
else
update XZXK_YLQXSCXKESL_XX_RYXX set sqid = V_sqid_h where QBID = V_qbid and rylx = '1';
end if;
--1.1.4 生产地址信息
if V_QYSCDZ1 > 0 then
INSERT INTO PUB_TABLE_DATA_DELEXC(ID, TABLENAME, TABLEPKNAME, TABLEPK, DELFLAG, INSTNUM, LASTDATE, DATEXC)
select sys_guid(), 'XZXK_YLQXSCXKESL_XX_SCDZ', 'BZJ', BZJ as TABLEPK, 'N', f_getslbs(), sysdate, '11' from XZXK_YLQXSCXKESL_XX_SCDZ where qbid = V_qbid;
delete XZXK_YLQXSCXKESL_XX_SCDZ where qbid = V_qbid;
insert into XZXK_YLQXSCXKESL_XX_SCDZ
(bzj, QBID, sqid, jtdz, gb, szsf, szqx, szjd, lxr, lxdh, yb, dzyx, instnum, lastdate, datexc)
select
sys_guid(), V_qbid, sqid, jtdz, gb, szsf, szqx, szjd, lxr, lxdh, yb, dzyx, f_getslbs(),sysdate,'11'
from GG_XKZ_YLQXSCXKESL_SCDZ
where sqid = V_sqid_h ;
else
update XZXK_YLQXSCXKESL_XX_SCDZ set sqid = V_sqid_h where QBID = V_qbid ;
end if;
if V_QYSCDZ2 > 0 then
INSERT INTO PUB_TABLE_DATA_DELEXC(ID, TABLENAME, TABLEPKNAME, TABLEPK, DELFLAG, INSTNUM, LASTDATE, DATEXC)
select sys_guid(), 'XZXK_YLQXSCXKESL_XX_SCDZ', 'BZJ', BZJ as TABLEPK, 'N', f_getslbs(), sysdate, '11' from XZXK_YLQXSCXKESL_XX_SCDZ where qbid = V_qbid;
delete XZXK_YLQXSCXKESL_XX_SCDZ where qbid = V_qbid;
insert into XZXK_YLQXSCXKESL_XX_SCDZ
(bzj, QBID, sqid, jtdz, gb, szsf, szqx, szjd, lxr, lxdh, yb, dzyx, instnum, lastdate, datexc)
select
sys_guid(), V_qbid, sqid, jtdz, gb, szsf, szqx, szjd, lxr, lxdh, yb, dzyx, f_getslbs(),sysdate,'11'
from GG_XKZ_YLQXSCXKESL_SCDZ
where sqid = V_sqid_h ;
select 1 into V_BS from dual ;
else
update XZXK_YLQXSCXKESL_XX_SCDZ set sqid = V_sqid_h where QBID = V_qbid ;
end if;
--1.1.5 生产范围信息表
if V_SCFW > 0 then
INSERT INTO PUB_TABLE_DATA_DELEXC(ID, TABLENAME, TABLEPKNAME, TABLEPK, DELFLAG, INSTNUM, LASTDATE, DATEXC)
select sys_guid(), 'XZXK_YLQXSCXKESL_XX_SCFW', 'BZJ', BZJ as TABLEPK, 'N', f_getslbs(), sysdate, '11' from XZXK_YLQXSCXKESL_XX_SCFW where qbid = V_qbid;
delete XZXK_YLQXSCXKESL_XX_SCFW where qbid = V_qbid;
insert into XZXK_YLQXSCXKESL_XX_SCFW
(bzj, QBID, sqid, gllb, cpldh, cplmc, cplxh, yjcplb, ejcplb, pmjl, cpms, yqyt, instnum, lastdate, datexc, cplx, lybz)
select
sys_guid(), V_qbid ,sqid, gllb, cpldh, cplmc, cplxh, yjcplb, ejcplb, pmjl, cpms, yqyt, f_getslbs(),sysdate,'11', cplx, lybz
from GG_XKZ_YLQXSCXKESL_SCFW
where sqid = V_sqid_h ;
select 1 into V_BS from dual ;
else
update XZXK_YLQXSCXKESL_XX_SCFW set sqid = V_sqid_h where QBID = V_qbid ;
end if;
--1.1.6 生产产品信息
if V_SCCP1 > 0 then
INSERT INTO PUB_TABLE_DATA_DELEXC(ID, TABLENAME, TABLEPKNAME, TABLEPK, DELFLAG, INSTNUM, LASTDATE, DATEXC)
select sys_guid(), 'XZXK_YLQXSCXKESL_XX_SCCP', 'BZJ', BZJ as TABLEPK, 'N', f_getslbs(), sysdate, '11' from XZXK_YLQXSCXKESL_XX_SCCP where qbid = V_qbid;
delete XZXK_YLQXSCXKESL_XX_SCCP where qbid = V_qbid;
insert into XZXK_YLQXSCXKESL_XX_SCCP
(bzj, QBID, sqid, sxh, sfstsc, zczh, gllb, cpldh, cplmc, cplxh, yjcplb, ejcplb, cpmc, lb, bz, instnum, lastdate, datexc, cplx, dzrq)
select
sys_guid(), V_qbid, sqid, sxh, sfstsc, zczh, gllb, cpldh, cplmc, cplxh, yjcplb, ejcplb, cpmc, lb, bz, f_getslbs(),sysdate,'11', cplx, dzrq
from GG_XKZ_YLQXSCXKESL_SCCP
where sqid = V_sqid_h ;
select 1 into V_BS from dual ;
else
update XZXK_YLQXSCXKESL_XX_SCCP set sqid = V_sqid_h where QBID = V_qbid ;
end if;
if V_SCCP2 > 0 then
INSERT INTO PUB_TABLE_DATA_DELEXC(ID, TABLENAME, TABLEPKNAME, TABLEPK, DELFLAG, INSTNUM, LASTDATE, DATEXC)
select sys_guid(), 'XZXK_YLQXSCXKESL_XX_SCCP', 'BZJ', BZJ as TABLEPK, 'N', f_getslbs(), sysdate, '11' from XZXK_YLQXSCXKESL_XX_SCCP where qbid = V_qbid;
delete XZXK_YLQXSCXKESL_XX_SCCP where qbid = V_qbid;
insert into XZXK_YLQXSCXKESL_XX_SCCP
(bzj, QBID, sqid, sxh, sfstsc, zczh, gllb, cpldh, cplmc, cplxh, yjcplb, ejcplb, cpmc, lb, bz, instnum, lastdate, datexc, cplx, dzrq)
select
sys_guid(), V_qbid, sqid, sxh, sfstsc, zczh, gllb, cpldh, cplmc, cplxh, yjcplb, ejcplb, cpmc, lb, bz, f_getslbs(),sysdate,'11', cplx, dzrq
from GG_XKZ_YLQXSCXKESL_SCCP
where sqid = V_sqid_h ;
else
update XZXK_YLQXSCXKESL_XX_SCCP set sqid = V_sqid_h where QBID = V_qbid ;
end if;
--long flow
if (V_QYSCDZ1 > 0 or V_SCCP2 > 0) then
select 0 into V_BS from dual ;
else
--short flow
select 1 into V_BS from dual ;
end if;
--
-- 短变更
if V_BS > 0 then
update GG_XKZ_YLQXSCXKESL set FZRQ = fzrqIn where sqid=V_sqid_h;
update xzxk_ylqxscxkesl_xx_qb set ( xkzbh, qymc, scfw, ZSDZ, czzt, fzjgmc, scfzrq, FZRQ, dzrq , DYBS ) =
( select xkzbh_idIn, qymc, scfw, ZS, 'V', FZJGMC, SCFZRQ, fzrqIn,DZRQ , DYBS from GG_XKZ_YLQXSCXKESL where sqid = V_sqid_h and czzt = 'V') where QBID = V_qbid ;
else
-- 长变更
update GG_XKZ_YLQXSCXKESL set FZRQ = fzrqIn, YXQZ = yxqzIn where sqid=V_sqid_h;
update xzxk_ylqxscxkesl_xx_qb set ( xkzbh, qymc, scfw, ZSDZ, czzt, fzjgmc, scfzrq, FZRQ, YXQZ, dzrq , DYBS ) =
( select xkzbh_idIn, qymc, scfw, ZS, 'V', FZJGMC, SCFZRQ, fzrqIn ,yxqzIn, DZRQ , DYBS from GG_XKZ_YLQXSCXKESL where sqid = V_sqid_h and czzt = 'V') where QBID = V_qbid ;
end if ;
----------------插入------医疗器械生产许可信息全表------------------结束-------------
--------------------------更新信息全表中 个别字段-----------------开始--------------
update xzxk_ylqxscxkesl_xx_qb set ( LXRXM , LXDH, ZZJGDM, datexc ) =
( select LXRXM , LXDH , ZZJGDM, '11' from XZXK_YLQXSCXKESL_BG_SQ where sqid = bgid_idIn ) where QBID = V_qbid ;
update XZXK_YLQXSCXKESL_xx_RYXX set XM =
( select XM from GG_XKZ_YLQXSCXKESL_RYXX where sqid = V_sqid_h and RYLX = '0' and rownum = 1 ) where QBID = V_qbid and RYLX = '0' ;
update XZXK_YLQXSCXKESL_xx_RYXX set XM =
( select XM from GG_XKZ_YLQXSCXKESL_RYXX where sqid = V_sqid_h and RYLX = '1' and rownum = 1 ) where QBID = V_qbid and RYLX = '1' ;
-- 更新企业类型
update xzxk_ylqxscxkesl_xx_qb set qylx =
( select qylx from XZXK_YLQXSCXKESL_BG_SQ where sqid = bgid_idIn ) where QBID = V_qbid ;
-- 修改许可证编号添加‘食’字
select length(xkzbh) into V_length from gg_xkz_ylqxscxkesl t where xkzbh = xkzbh_idIn and czzt = 'V';
-- 修改旧数据
IF V_length < 17 THEN
SELECT REPLACE(xkzbh,(substr( xkzbh, 0, 2 )), '京食药') into V_name2 from xzxk_ylqxscxkesl_xx_qb t where xkzbh = xkzbh_idIn ;
update xzxk_ylqxscxkesl_xx_qb set xkzbh = V_name2 where QBID = V_qbid ;
update gg_xkz_ylqxscxkesl set xkzbh = V_name2 where sqid = V_sqid_h and czzt = 'V' ;
update XZXK_YLQXSCXKESL_BG_SQ set xkzbh = V_name2 where sqid = bgid_idIn ;
END IF ;
--------------------------更新信息全表中 个别字段-----------------开始--------------
flag := 'Y';
commit;
Exception
WHEN v_raise THEN
flag := 'N';
rollback;
WHEN NO_DATA_FOUND THEN
flag := 'E';
rollback;
end YLQXSCXKESL_GGXKZ_TO_QB;
存储过程系列五:完整的存储过程备份使用函数REPLACE()substr()的更多相关文章
- sql server 备份与恢复系列五 完整模式下的备份与还原
一.概述 前面介绍了简单恢复模式和大容量恢复模式,这篇继续写完整恢复模式下的备份与还原.在完整恢复模式里最大的优点是只要能成功备份尾日志,就可以还原到日志备份内包含的任何时点("时点恢复&q ...
- SQL Server 2008空间数据应用系列十:使用存储过程生成GeoRSS聚合空间信息
原文:SQL Server 2008空间数据应用系列十:使用存储过程生成GeoRSS聚合空间信息 友情提示,您阅读本篇博文的先决条件如下: 1.本文示例基于Microsoft SQL Server 2 ...
- Code First系列之视图,存储过程和异步API
返回<8天掌握EF的Code First开发>总目录 本篇目录 视图View 存储过程 使用存储过程CRUD 异步API 本章小结 自我测试 本系列的源码本人已托管于coding上:点击查 ...
- 解剖SQLSERVER 第十五篇 SQLSERVER存储过程的源文本存放在哪里?(译)
解剖SQLSERVER 第十五篇 SQLSERVER存储过程的源文本存放在哪里?(译) http://improve.dk/where-does-sql-server-store-the-sourc ...
- MySql 存储过程实例(附完整注释)(转)
MySql 存储过程实例(附完整注释) 将下面的语句复制粘贴可以一次性执行完,我已经测试过,没有问题! MySql存储过程简单实例: ...
- SQL Server中使用msdb数据库的存储过程sp_delete_backuphistory和sp_delete_database_backuphistory来删除备份和恢复历史数据
根据微软文档对sp_delete_backuphistory存储过程的介绍,SQL Server在每次备份和恢复数据库后,会向msdb系统数据库的备份和恢复历史表写入数据,如果SQL Server经常 ...
- 存储过程系列之调试存储过程 SQL Server 2005
在数据库中直接调试 在数据库中直接调试是调试SQL Server 2005的存储过程的最简单的方法. 在Visual Stuido的IDE中你可以选择单步执行存储过程,然后就可以一条语句一条语句地单 ...
- 存储过程系列之存储过程具体操作过程及sql数据库调用
Transact-SQL中的存储过程,非常类似于Java语言中的方法,它可以重复调用.当存储过程执行一次后,可以将语句缓存中,这样下次执行的时候直接使用缓存中的语句.这样就可以提高存储过程的性能. 存 ...
- 存储过程系列之存储过程sql数据库调用和程序代码调用
1.存储过程,无参数的存储过程 创建无参数存储存储过程 Create Procedure DCEMREMR_TEMPLATEAs SELECT TOP 10 [FILENAME],[FILETITLE ...
随机推荐
- 随笔:Golang 时间Time
先了解下time类型: type Time struct { // sec gives the number of seconds elapsed since // January 1, year 1 ...
- TdxBarButton的FASTSCRIPT封装
TdxBarButton的FASTSCRIPT封装 // cxg 2017-2-13 unit fs_dev; interface{$i fs.inc}uses fs_iinterpreter, fs ...
- Andriod PopupWindow 键盘冲突
调起键盘的时候,弹出PopupWindow,但是键盘没有隐藏. private void init() { View contentView = LayoutInflater.from(mContex ...
- Go -- socket read的内容以16进制输出
buf := make([]) reqLen, err := conn.Read(buf) // 遍历, 转为16进制 buffer := new(bytes.Buffer) for _, b := ...
- OpenSceneGraph FAQ 【转】
1.地球背面的一个点,计算它在屏幕上的坐标,能得到吗? 不是被挡住了吗? 答:计算一个空间点的屏幕坐标,使用osgAPEx::GetScreenPosition函数.当空间点处于相机视空间内(不管它是 ...
- Gvim 和 Opencv编译
好奇看了一下Gvim编译器:在官网上也有介绍,github上有源码,安装在电脑上,感觉需求不大,记那些命令也太多了.然后编译opencv过程中cmake成功了,但是VS下编译报了很多错,准备不搞这些了 ...
- -webkit-transform:translate3d(0,0,0)触发GPU加速,让网页动画更流畅
前段时间,依照美拍的视频效果写了一个效果类似的网页版的动画. 电脑上安装了三种浏览器:IE.Chrome.Firefox.分别作了測试,结果显示Chrome在这方面的渲染效果最差.常常出现卡顿现象.f ...
- Path SumI、II——给出一个数,从根到子的和等于它
I.Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up a ...
- WinDbg加载不同版本CLR
WinDbg调试.net2.0和.net4.0程序有所不同,因为.net4.0使用新版本的CLR.例如: mscoree.dll 变为 mscoree.dll 和 mscoreei.dll, msco ...
- linux系列之-—04 自动删除n天前日志【转】
让Linux系统定时清理一些不需要的文件,日志很有必要 1. 删除文件命令: find 对应目录 -mtime +天数 -name "文件名" -exec rm -rf {} \; ...