- Create table
1
2
3
4
create table MESSAGE_STORE(
message varchar2(200)
whenreceived date default sysdate
);
- insert xml into table
1
2
3
4
5
6
insert into MESSAGE_ARCHIVE (message) values ('<message><client><uid>1</uid></client></message>');
insert into MESSAGE_ARCHIVE (message) values ('<message><client><uid>2</uid></client></message>');
insert into MESSAGE_ARCHIVE (message) values ('<message><client><uid>3</uid></client></message>');
insert into MESSAGE_ARCHIVE (message) values ('<message><client><uid>4</uid></client></message>');
insert into MESSAGE_ARCHIVE (message) values ('<message><client><uid>3</uid></client></message>');
insert into MESSAGE_ARCHIVE (message) values ('<message><client><uid>4</uid></client></message>');
- Oracle update records for specific day
1
2
3
update MESSAGE_STORE
set WHENRECEIVED=null
where trunc(WHENRECEIVED) = to_date('10-02-2012','DD-MM-YYYY');