惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
Stack Overflow Blog
Stack Overflow Blog
量子位
腾讯CDC
N
Netflix TechBlog - Medium
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
S
SegmentFault 最新的问题
A
About on SuperTechFans
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tailwind CSS Blog
G
Google Developers Blog
U
Unit 42
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
雷峰网
雷峰网
罗磊的独立博客
Vercel News
Vercel News
L
LangChain Blog
V
V2EX
P
Proofpoint News Feed
M
MIT News - Artificial intelligence
博客园 - Franky
V
Visual Studio Blog
J
Java Code Geeks

博客园 - 笑笑江南

sss IBATIS 延迟加载 iBATIS一对多/多对多N+1问题解决方案 - 笑笑江南 - 博客园 [转]office outlook 2007 如何设置开机自动启动 代码整洁之道 类关系 eclipse 快捷键 mysql 常用函数 利用myeclipse生成Hibernate Mapping文件【转】 配置eclipse下tomcat启动参数【转】 安装svneclipse .net 开发相关工具(包)的作用 basicform 与 store gridpanel中拖拽排序 struts2 file 标签产生的一个问题 使用 ajax 提交数据 applyTo ,render, contentel,el,applytomarkup 的区别 呕吐呕吐 tabpanel 添加 tab
9-15 企业数据更新
笑笑江南 · 2009-09-16 · via 博客园 - 笑笑江南

update company_test ,no_ic_code  set company_test.ic_code = no_ic_code.执照注册号
where  no_ic_code.企业名称 = company_test.name

update company_test ,t_all  set company_test.ic_code = t_all.工商登记号
where t_all.企业名称 = company_test.name
and (t_all.`工商登记号` REGEXP '^[[:blank:]]{0,3}([A-Z]|[[:digit:]]){15}[[:blank:]]{0,3}$' =1
or t_all.`工商登记号` REGEXP '^[[:blank:]]{0,3}([A-Z]|[[:digit:]]){13}[[:blank:]]{0,3}$'=1
or t_all.`工商登记号` REGEXP '^[[:blank:]]{0,3}([A-Z]|[[:digit:]]){13}[[:blank:]]{0,3}$'=1
or  t_all.`工商登记号` REGEXP '^[[:blank:]]{0,3}[BCF][[:digit:]]{5}[[:blank:]]{0,3}$'=1
 or t_all.`工商登记号` REGEXP '^[[:blank:]]{0,3}([[:alpha:]]+第[[:digit:]]+号?)[[:blank:]]{0,3}$' =1
)

update company_test ,ic_ischinese
set company_test.ic_code = ic_ischinese.`执照注册号`
 where company_test.name = ic_ischinese.`企业名称`

create table  irregular_org_code_new as  SELECT *  FROM irregular_org_code

update company_test,irregular_org_code_new set company_test.org_code = replace(replace(备注栏,"朝阳  ",""),"顺义  ","")

where irregular_org_code_new.企业名称 = company_test.name and  replace(replace(备注栏,"朝阳  ",""),"顺义  ","") regexp
'^[[:blank:]]{0,3}([A-Z]|[[:digit:]]){9}[[:blank:]]{0,3}$'

update company_test ,irregular_org_code_new set company_test.org_code_syned = '1'
 where company_test.name = irregular_org_code_new.企业名称
and irregular_org_code_new.备注栏 = '√'
-------------------------------------------------------------------

update no_reg_in_guo_di2 set 是否异地纳税 = '1'
where no_reg_in_guo_di2.是否异地纳税 like '%是%'  or
no_reg_in_guo_di2.是否异地纳税 = '异地纳税' ;

update no_reg_in_guo_di2 set 是否异地纳税 = '-1'
where no_reg_in_guo_di2.是否异地纳税 = '否' ;


update company_test, no_reg_in_guo_di2 set company_test.state_tax_code = no_reg_in_guo_di2.国税税务登记号,
company_test.local_tax_code = no_reg_in_guo_di2.地税税务登记号,
company_test.ydns =  no_reg_in_guo_di2.是否异地纳税
where company_test.name = no_reg_in_guo_di2.企业名称

------------------------------------------------------------------------------

update no_reg_in_guo_di , company_test set company_test.state_tax_code = no_reg_in_guo_di.国税登记号
WHERE company_test.name = no_reg_in_guo_di.企业名称

update company_test ,t_all  set company_test.ic_code = replace(t_all.工商登记号,"迁出","")
where t_all.企业名称 = company_test.name
and (

t_all.`工商登记号` REGEXP '^[[:blank:]]{0,3}迁出([A-Z]|[[:digit:]]){15}[[:blank:]]{0,3}$' =1
or t_all.`工商登记号` REGEXP '^[[:blank:]]{0,3}迁出([A-Z]|[[:digit:]]){13}[[:blank:]]{0,3}$'=1
or t_all.`工商登记号` REGEXP '^[[:blank:]]{0,3}迁出([A-Z]|[[:digit:]]){13}[[:blank:]]{0,3}$'=1
or t_all.`工商登记号` REGEXP '^[[:blank:]]{0,3}迁出[BCF][[:digit:]]{5}[[:blank:]]{0,3}$'=1
or t_all.`工商登记号` REGEXP '^[[:blank:]]{0,3}迁出([[:alpha:]]+第[[:digit:]]+号?)[[:blank:]]{0,3}$' =1
 

)
commit;


select * from company_test where name ='东美国际航空旅行社有限公司'
775455158

update company_test set ic_code = '775455158' where name ='东美国际航空旅行社有限公司'

select * from company_test where name like '%北京北人羽新有限公司(办公室)%'
801236427

update company_test set ic_code = '801236427' WHERE name like '%北京北人羽新有限公司(办公室)%'