如何每月自动在特定日期将值插入表格? [英] how can i insert values into table on particular date each month automatically?

查看:87
本文介绍了如何每月自动在特定日期将值插入表格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,先生,




注册后30天后,一定金额的钱会自动插入一个人,然后每个月都会向他插入相同的金额.


谢谢与问候
Jaheena

Hi Sir,




A certain amount of money will insert to a person automatically after 30 days of registration and after that each month will insert same amount to him.


Thanks and Regards
Jaheena

推荐答案

安排项目或使用Windows服务.将其配置为在每月的1号执行相同的操作.保持服务运行,它将在配置日自动更新表.

看看如何使Windows服务:
简单Windows服务示例 [ Windows Services in Action I [
Schedule an item or use Windows service. Configure it to do the same on 1st of every month. Keep the service running and it will automatically update the table on confugured day.

To have a look at how to make Windows service:
Simple Windows Service Sample[^]
Windows Services in Action I[^]


您可以编写存储过程并使用以下任意一项计划作业方式:
1)http://msdn.microsoft.com/en-us/library/ms191439.aspx
2)使用DBMS_JOB包,我们可以安排作业.

例子:

DBMS_JOB .SUBMIT

DBMS_JOB .RUN.

使用DBMS_SCHEDULER
用于创建作业的语法
dbms_scheduler.create_job(
ob_name IN VARCHAR2
job_type IN VARCHAR2
job_action IN VARCHAR2
number_of_arguments IN PLS_INTEGER默认0
start_date IN TIMESTAMP WITH TIME ZONE DEFAULT NULL
repeat_interval IN VARCHAR2默认为NULL
end_date IN TIMESTAMP WITH TIME ZONE DEFAULT NULL
job_class IN VARCHAR2 DEFAULT''DEFAULT_JOB_CLASS''
已启用IN BOOLEAN DEFAULT FALSE
auto_drop IN BOOLEAN DEFAULT TRUE
VARCHAR2 DEFAULT NULL中的注释);
You can write a storeprocedure and schedule the job using either of the following ways:
1)http://msdn.microsoft.com/en-us/library/ms191439.aspx
2)Using DBMS_JOB package we can schedule the job.

Examples:

DBMS_JOB .SUBMIT

DBMS_JOB .RUN.

Using DBMS_SCHEDULER
SYNTAX FOR CREATING JOB
dbms_scheduler.create_job(
ob_name IN VARCHAR2
job_type IN VARCHAR2
job_action IN VARCHAR2
number_of_arguments IN PLS_INTEGER DEFAULT 0
start_date IN TIMESTAMP WITH TIME ZONE DEFAULT NULL
repeat_interval IN VARCHAR2 DEFAULT NULL
end_date IN TIMESTAMP WITH TIME ZONE DEFAULT NULL
job_class IN VARCHAR2 DEFAULT ''DEFAULT_JOB_CLASS''
enabled IN BOOLEAN DEFAULT FALSE
auto_drop IN BOOLEAN DEFAULT TRUE
comments IN VARCHAR2 DEFAULT NULL);


这篇关于如何每月自动在特定日期将值插入表格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆