Home » SQL & PL/SQL » SQL & PL/SQL » Can trigger autostart on Specific Dates
Can trigger autostart on Specific Dates [message #233756] Fri, 27 April 2007 06:23 Go to next message
farnush
Messages: 2
Registered: April 2007
Junior Member
Well i am trying to develop an online Banking website for my university ADBMS subject and i need to know if A trigger can autostart on specific day of the month to run a trigger that calculates the daily balance and add the dailt interest interest .
Anyone has any ideas . Don't worry i am not asking for the code but ideas please !!

[Updated on: Fri, 27 April 2007 06:24]

Report message to a moderator

Re: Can trigger autostart on Specific Dates [message #233759 is a reply to message #233756] Fri, 27 April 2007 06:30 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Yuo want to look at DBMS_JOB if you're using Oracle 8i or 9i, and ]DBMS_SCHEDULER if you're using 10g.

[fixed links]

[Updated on: Fri, 27 April 2007 06:32]

Report message to a moderator

Re: Can trigger autostart on Specific Dates [message #233760 is a reply to message #233756] Fri, 27 April 2007 06:31 Go to previous messageGo to next message
farnush
Messages: 2
Registered: April 2007
Junior Member
Here are my DDL

conn system/manager

Create User nushy Identified by haha;
Grant unlimited Tablespace,Resource,Connect to nushy; 

conn nushy/haha


CREATE TABLE customers
(
custId number primary key,
fname varchar2(20) not null,
lname varchar2(20),
cardno varchar(16) unique not null,
pin number(4) not null,
address varchar2(60),
sex varchar(1),
email varchar2(30),
Dob date,
pic varchar2(60),
constraint sex_ck check (sex in ('m','f')) 
);



CREATE TABLE AccountTypes
(
accountTypeId number(2) primary key,
category varchar2(20),
interest number(2)
);

 
CREATE TABLE Accounts 
(
accountNo varchar2(12) primary key,
balance number(10,2),
createdOn date,
custId number,
accountTypeId number(2),
constraint cust_fk foreign key (custid) references customers(custid),
constraint acc_type_fk foreign key (accountTypeId) references AccountTypes(accountTypeId)
);



CREATE TABLE Transactions
(
tId number(6) primary key,
accountNo varchar2(12) ,
tDate date,
tAmount number(10,2),
tnote varchar2(120),
pBalance number(10,2),
constraint Trans_fk foreign key (accountNo) references Accounts (accountNo) 
);

create table bills
(
billid number primary key,
accountNo varchar2(12),
amount number(10,2),
receiver varchar2(20),
Constraint bills_fk Foreign key  (accountNo) references accounts(accountNo)
);

create sequence tId_seq
increment by 1
start with 1000
nomaxvalue 
nominvalue
nocache
nocycle;

create sequence custId_seq
increment by 1
start with 1000
nomaxvalue
nominvalue
nocache
nocycle;

create sequence bill_seq
increment by 1
start with 1000
nomaxvalue
nominvalue
nocache 
nocycle;


Re: Can trigger autostart on Specific Dates [message #234290 is a reply to message #233756] Mon, 30 April 2007 13:39 Go to previous message
Bill B
Messages: 1971
Registered: December 2004
Senior Member
... edited to remove comment. His trigger was not a table trigger, but a timed event...

[Updated on: Mon, 30 April 2007 13:41]

Report message to a moderator

Previous Topic: Error ORA-00978
Next Topic: PLS-00402
Goto Forum:
  


Current Time: Thu Dec 05 13:06:04 CST 2024