割接(2)

insert into comment_ctrl
(
   tablename, 
   actionsql,
   isnumber,
   maxandminsql
)
values
(
   'us_usercomment',
   'update us_usercomment t
   set t.isnotcnchar = decode(t.content,convert(t.content, ''US7ASCII'', ''ZHS16GBK''),
                              ''0'',
                              ''1'')
where t.msisdn >= :a and t.msisdn < :b',
'0',
'select max(t.msisdn),min(t.msisdn)  from us_usercomment t'
);
insert into comment_ctrl
(
   tablename, 
   actionsql,
   isnumber,
   maxandminsql
)
values
(
   'us_topic',
   'update us_topic t
   set t.isnotcnchar = decode(t.content,convert(t.content, ''US7ASCII'', ''ZHS16GBK''),
                              ''0'',
                              ''1'')
where t.topicid >= :a and t.topicid < :b',
'1',
'select max(t.topicid),min(t.topicid)  from us_topic t'
);
insert into comment_ctrl
(
   tablename, 
   actionsql,
   isnumber,
   maxandminsql
)
values
(
   'us_leaveword',
   'update us_leaveword t
   set t.isnotcnchar = decode(t.leaveword,convert(t.leaveword, ''US7ASCII'', ''ZHS16GBK''),
                              ''0'',
                              ''1'')
where t.leavewordid >= :a and t.leavewordid < :b',
'1',
'select max(t.leavewordid),min(t.leavewordid)  from us_leaveword t'
);
commit; 

--割接us_publiccomment表
alter table us_publiccomment add isnotcnchar varchar2(1) default '0' not null;
comment on column us_publiccomment.isnotcnchar                                                 
  is '非汉字内容 0 非汉字 1 汉字内容';
--对us_bookcomment_audit数据割接
alter table us_bookcomment_audit add isnotcnchar varchar2(1) default '0' not null;
comment on column us_bookcomment_audit.isnotcnchar
  is '非汉字内容 0 非汉字 1 汉字内容';
 
--对书评发布表(us_bookcomment_publish)表进行数据割接
alter table us_bookcomment_publish add isnotcnchar varchar2(1) default '0' not null;
comment on column us_bookcomment_publish.isnotcnchar                                                 
  is '非汉字内容 0 非汉字 1 汉字内容';
 
--对us_usercomment表进行数据割接
alter table us_usercomment add isnotcnchar varchar2(1) default '0' not null;
comment on column us_usercomment.isnotcnchar                                                 
  is '非汉字内容 0 非汉字 1 汉字内容';
 
--对us_topic表进行数据割接
alter table us_topic add isnotcnchar varchar2(1) default '0' not null;
comment on column us_topic.isnotcnchar                                                 
  is '非汉字内容 0 非汉字 1 汉字内容';

--对us_leaveword表进行数据割接
alter table us_leaveword add isnotcnchar varchar2(1) default '0' not null;
comment on column us_leaveword.isnotcnchar                                                 
  is '非汉字内容 0 非汉字 1 汉字内容';

你可能感兴趣的:(割接(2))