当前位置:Gxlcms > mysql > 图书馆剔旧

图书馆剔旧

时间:2021-07-01 10:21:17 帮助过:78人阅读

适用于Oracle10.0版本的MELINETS Oracle Sybase JDBC Driver SQLiteClientSyncProvider FILENAME: 2014-06-25.doc DATE:June 25, 2014create table manager.tijiu(rec_ctrl_id char(10) not null,book_barcode varchar(24) not null);insert manager.tijiu

适用于 Oracle 10.0版本的 MELINETS
Oracle Sybase JDBC Driver SQLiteClientSyncProvider
FILENAME:  2014-06-25.doc                         DATE:June 25, 2014

create table manager.tijiu
(rec_ctrl_id char(10) not null,book_barcode varchar(24) not null);

insert manager.tijiu(rec_ctrl_id,book_barcode)
select rec_ctrl_id,book_barcode  
from manager.ct_1_A 
where department_id='32' 
and circul_num=0;

//Results Rows 41815

delete from manager.tijiu 
where rec_ctrl_id in 
(select rec_ctrl_id from circul.circulog_A
   where operate_date>='2008-01-01');

//Results Rows 36753
 
delete from manager.tijiu 
where rec_ctrl_id in 
(select rec_ctrl_id from circul.circulog_archive_A
 where operate_date>='2008-01-01');
 
//Results Rows 31368

delete from manager.tijiu 
where rec_ctrl_id in 
(select rec_ctrl_id from manager.ct_2_A 
where department_id='32' 
and date_in>='2010-01-01');

//Results Rows 23694

select a.title,b.book_barcode,a.class_no_1,c.book_search_no 
from manager.main_bibli a,
      manager.tijiu b,
     manager.ct_2_A c
where a.rec_ctrl_id in
(select rec_ctrl_id from manager.tijiu
 where b.rec_ctrl_id in
(select rec_ctrl_id from manager.ct_2_A 
where b.rec_ctrl_id=c.rec_ctrl_id));

//Results Rows 23694    in filename  剔旧20140625.txt 


人气教程排行