SQL 2005中的更新表 [英] update table in sql 2005
本文介绍了SQL 2005中的更新表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个表,分别是"stock(ItemName,Quantity)"和WeeklyStock(ItemName,StartQuantity,date).
当服务器日期和时间变为星期日凌晨1:00时,我想在本周结束时从库存表更新WeeklyStock表(自动在星期日凌晨1:00).
我的意思是表库存"中列出的每个项目都应在一周结束时插入周表"表中,请告诉我如何实现此目标?
I have two tables namely ''stock(ItemName,Quantity)'' and WeeklyStock(ItemName,StartQuantity,date).
I want to update WeeklyStock table from stock table at the end of the week(on sunday 1:00 am automatically) when the server date and time becomes sunday 1:00am.
I mean every item listed in table "stock" should be inserted to the "WeeklyTable" table at the end of week, please advice me as to how this can be achived ?
推荐答案
不使用SQL作业-假设您正在使用SQL Server.作业应执行一个存储过程,以更新您的每周数据表.
No use a SQL Job - assuming you are using SQL Server. The Job should execute a stored procedure that updates your weekly data table.
您好,
按照安排工作链接,它可能对您有帮助,
谢谢
-Amit.
Hi,
Follow Schedule a job link, it may help you,
thanks
-Amit.
这篇关于SQL 2005中的更新表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文