sql backup
create or replace procedure P_updateas
begin
update security_price p
set p.closing_price =
(select MIN(a.close_price) KEEP(DENSE_RANK last ORDER BY trade_date)
from DATAAPP1.cicc_index_daily@WIND a
where to_date(a.trade_date, 'yyyymmdd') <=p.pricing_date
and a.sec_name = '沪深300全收益'
and a.ticker = 'h00300'
)
where p.security_id = 1000006869;
update security_price p
set p.closing_price =
(select MIN(a.close_price) KEEP(DENSE_RANK last ORDER BY trade_date)
from DATAAPP1.cicc_index_daily@WIND a
where to_date(a.trade_date, 'yyyymmdd') <=p.pricing_date
and a.sec_name = '中证500全收益'
and a.ticker = 'h00905'
)
where p.security_id = 1000029000000002;
update security_price p
set p.closing_price =
(select MIN(a.close_price) KEEP(DENSE_RANK last ORDER BY trade_date)
from DATAAPP1.cicc_index_daily@WIND a
where to_date(a.trade_date, 'yyyymmdd') <=p.pricing_date
and a.sec_name = '上证50全收益'
and a.ticker = 'h00016'
)
where p.security_id = 1000034700000001;
update security s
set s.latest_close_price =
(select MIN(a.close_price) KEEP(DENSE_RANK last ORDER BY trade_date)
from DATAAPP1.cicc_index_daily@WIND a where a.sec_name = '沪深300全收益' and a.ticker = 'h00300')
where s.id = 1000006869;
update security s
set s.latest_close_price =
(select MIN(a.close_price) KEEP(DENSE_RANK last ORDER BY trade_date)
from DATAAPP1.cicc_index_daily@WIND a where a.sec_name = '中证500全收益' and a.ticker = 'h00905')
where s.id = 1000029000000002;
update security s
set s.latest_close_price =
(select MIN(a.close_price) KEEP(DENSE_RANK last ORDER BY trade_date)
from DATAAPP1.cicc_index_daily@WIND a where a.sec_name = '上证50全收益' and a.ticker = 'h00016')
where s.id = 1000034700000001;
COMMIT;
end p_update_price;
declare
job number;
begin
sys.dbms_job.submit(
job => job,
what => 'p_update_price;',
next_date => to_date('10-08-2018 18:30:00', 'dd-mm-yyyy hh24:mi:ss'),
interval =>'trunc(sysdate)+1+(18*60+30)/(24*60)');
commit;
end;
sql backup的更多相关文章
- SQL backup&restore
--完整备份Backup Database NorthwindCSTo disk='G:\Backup\NorthwindCS_Full_20070908.bak' --差异备份Backup Data ...
- MS SQL backup database的俩个参数
http://msdn.microsoft.com/zh-cn/library/ms186865.aspx 数据传输选项 BUFFERCOUNT = { buffercount | @bufferco ...
- 第一章、关于SQL Server数据库的备份和还原(sp_addumpdevice、backup、Restore)
在sql server数据库中,备份和还原都只能在服务器上进行,备份的数据文件在服务器上,还原的数据文件也只能在服务器上,当在非服务器的机器上启动sql server客户端的时候,也可以通过该客户端来 ...
- SQL Server 大数据搬迁之文件组备份还原实战
一.本文所涉及的内容(Contents) 本文所涉及的内容(Contents) 背景(Contexts) 解决方案(Solution) 搬迁步骤(Procedure) 搬迁脚本(SQL Codes) ...
- SQL Server 批量完整备份
一.本文所涉及的内容(Contents) 本文所涉及的内容(Contents) 背景(Contexts) 实现代码(SQL Codes) 实现方式一(One) 实现方式二(Two) 实现方式三(Thr ...
- backup log is terminating abnormally because for write on file failed: 112(error not found)
昨天遇到一个案例,YourSQLDba做事务日志备份时失败,检查YourSQLDba输出的错误信息如下: <Exec> <ctx>yMaint.backups</ctx& ...
- C#对SQL Server数据库的备份与还原
备份数据库: string connectionString = "server=服务器名称;database=数据库名;uid=登入名;pwd=登入密码"; // ...
- --自动创建备份SQL
--自动创建备份SQL DECLARE @dbname VARCHAR(50) ,--要备份的数据库名称 @bakname VARCHAR(50) ,--备份后的bat名称 @sql VARCHAR( ...
- SQL Server中的事务日志管理(3/9):事务日志,备份与恢复
当一切正常时,没有必要特别留意什么是事务日志,它是如何工作的.你只要确保每个数据库都有正确的备份.当出现问题时,事务日志的理解对于采取修正操作是重要的,尤其在需要紧急恢复数据库到指定点时.这系列文章会 ...
随机推荐
- intellij idea 配置web 项目
Intellij Idea 创建Web项目入门(一)(转载) 相关软件: Intellij Idea14:http://pan.baidu.com/s/1nu16VyD JDK7:http://p ...
- 关于malloc(0)的返回值问题--这两天的总结与实践篇
就像我在http://www.cnblogs.com/wuyuegb2312/p/3219659.html 文章中评论的那样,我也碰到了被提问这个malloc(0)的返回值问题,虽然感觉这样做在实际中 ...
- idea2017授权
http://blog.csdn.net/qq_27686779/article/details/78870816 文章中注册码: BIG3CLIK6F-eyJsaWNlbnNlSWQiOiJCSUc ...
- 动态修改属性设置 easyUI
if(条件){ $("#area").combobox({ required:false }); }else{ $("#area").combobox({ r ...
- SQL数据库优化
1.对查询进行优化,要尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引. 2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索 ...
- js基础-直接量与变量
直接量 123 "abc" console.log("234") true false 变量 var x = 123 变量可先声明后赋值 var定义的都是局部变 ...
- php zip扩展的一些基本操作
public function zip_test() { $zip_obj = new ZipArchive(); $res = $zip_obj->open('/data1/www/www.k ...
- Excel批量修改文件
[1]把下图片放在一个文件目录下面,如E:\SVM_Class\airplanes [2]点击“开始”→“运行”(或按快捷键win+R),在弹出框中输入“cmd”,进入dos操作界面. [3]do ...
- Global Illumination
[Global Illumination] Global Illumination (GI) is a system that models how light is bounced off of s ...
- 解题(MiGong--迷宫问题(深度搜索))
题目描述 定义一个二维数组N*M(其中2<=N<=10;2<=M<=10),如5 × 5数组下所示: int maze[5][5] = { 0, 1, 0, 0, 0, 0, ...