Home > Database > Mysql Tutorial > 图书馆剔旧

图书馆剔旧

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 14:58:06
Original
1175 people have browsed it

适用于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 


Copy after login
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template