This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Oracle/OAS and the fly likes doubt in oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "doubt in oracle" Watch "doubt in oracle" New topic
Author

doubt in oracle

kranthiswaroop talluri
Greenhorn

Joined: Mar 17, 2006
Posts: 3
hai friends.iam making an web sites in that i have a doubt.in oracle i had created a table name swa when ever i insert values in it,it has to update the table plus what i had inserted in the table ie the values are to be entered in text document automatically is it possible.please reply soon if you cant understand my doubt please reply i will explain.if you know please send me code
Arief Setiawan
Greenhorn

Joined: Sep 06, 2006
Posts: 12
did you means create some kind of log?
maybe you can use trigger on your table

CREATE OR REPLACE TRIGGER trigger_name
after update on table_name
for each row
begin
-- do something here
insert into your_table_log(dateupdate,oldvalue,newvalue) values(sysdate, ld.your_column,:new.yourcolumn)
end;
/
Arief Setiawan
Greenhorn

Joined: Sep 06, 2006
Posts: 12
i'm sorry...
add commit after you insert log

CREATE OR REPLACE TRIGGER trigger_name
after update on table_name
for each row
begin
-- do something here
insert into your_table_log(dateupdate,oldvalue,newvalue) values(sysdate, ld.your_column,:new.yourcolumn);
commit;
end;
/
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: doubt in oracle