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):事务日志,备份与恢复
当一切正常时,没有必要特别留意什么是事务日志,它是如何工作的.你只要确保每个数据库都有正确的备份.当出现问题时,事务日志的理解对于采取修正操作是重要的,尤其在需要紧急恢复数据库到指定点时.这系列文章会 ...
随机推荐
- JDBC是如何执行SQL脚本的
(1) 加载JDBC驱动程序: Cllass.forName(" 驱动程序" ); //你要连接的数据库对象 (2) 建立连接 Connection conn=DriverMa ...
- (转)JS之——解决IE6、7、8使用JSON.stringify报JSON未定义错误的问题
https://blog.csdn.net/l1028386804/article/details/53439755 在通过JavaScript将对象类型的参数通过JSON.stringify转换成字 ...
- C# 反射获取所有视图
原地址:忘了 controller 的 action 加上属性 [System.ComponentModel.Description("菜单列表")] 且 返回值为 Syste ...
- oracle RMAN使用
一步一步学RMAN 备份 RMAN连接上ORACLE,WINDOWS下在命令模式下 RMAN TARGET / 连接本地数据库用的是本地认证模式.RMAN连接数据库必须在dedicate模式下.因此在 ...
- Restrict & Cascade
[Restrict & Cascade] 参考:https://my.oschina.net/cart/blog/277624
- python-ceilometerclient命令行(终结)
ceilometerclient入口 工程ceilometerclient shell.py中的main方法 ceilometerclient目录 --ceilometerclient --commo ...
- WPF HyperLink链接下划线隐藏
两种方法: 1.在Grid标签内添加资源样式. <Grid.Resources> <Style TargetType="Hyperlink"> <Se ...
- C#调用dll提示"试图加载格式不正确的程序"原因及解决方法
转载:https://blog.csdn.net/songyi160/article/details/51354660 程序在32位操作系统上运行正常,在64位操作系统上运行读卡功能提示”试图加载格式 ...
- NumPy 切片和索引
NumPy 切片和索引 ndarray对象的内容可以通过索引或切片来访问和修改,与 Python 中 list 的切片操作一样. ndarray 数组可以基于 0 - n 的下标进行索引,切片对象可以 ...
- 【转】iOS 自动化性能采集
前言 对于iOS总体生态是比较封闭的,相比Android没有像adb这种可以查看内存.cpu的命令.在日常做性能测试,需要借助xcode中instruments查看内存.cpu等数据. 但是借助i ...