set @address='中国-山东省-聊城市-莘县'; select @address
select length('a')
,char_length('a')
,length('中')
,char_length('中')
set @address='中国-山东省-聊城市-莘县'; select @address ,replace(@address,'-','') as address_1 ,length(@address) as len_add1 ,length(replace(@address,'-','')) as len_add2 ,length(@address)-length(replace(@address,'-','')) as _count
select max(length(com_industry)-length(replace(com_industry,'-',''))) as _max_count from etl1_socom_data
set @address='中国-山东省-聊城市-莘县'; select substring_index(@address,'-',1) as china, substring_index(substring_index(@address,'-',2),'-',-1) as province, substring_index(substring_index(@address,'-',3),'-',-1) as city, substring_index(@address,'-',-1) as district
case when then when then else 值 end as 字段名 select case when 89>101 then '大于' else '小于' end as betl1_socom_data
select a.*, case when com_district like '%业' or com_district like '%织' or com_district like '%育' then null else com_district end as com_district1 ,case when com_district like '%业' or com_district like '%织' or com_district like '%育' then concat(com_district,'-',com_industry) else com_industry end as com_industry_total ,replace(com_addr,'地 址:','') as com_addr1 ,replace(com_phone,'电 话:','') as com_phone1 ,replace(com_fax,'传 真:','') as com_fax1 ,replace(com_mobile,'手机:','') as com_mobile1 ,replace(com_url,'网址:','') as com_url1 ,replace(com_email,'邮箱:','') as com_email1 ,replace(com_contactor,'联系人:','') as com_contactor1 ,replace(com_emploies_nums,'公司人数:','') as com_emploies_nums1 ,replace(com_reg_capital,'注册资金:万','') as com_reg_capital1 ,replace(com_type,'经济类型:','') as com_type1 ,replace(com_product,'公司产品:','') as com_product1 ,replace(com_desc,'公司简介:','') as com_desc1 from s_socom_data as a
select a.*, case #行业为''的值 置为空 when length(com_industry)=0 then null #其他的取第一个-分隔符之前 else substring_index(com_industry,'-',1) end as com_industry1, case when length(com_industry)-length(replace(com_industry,'-',''))=0 then null #'交通运输、仓储和邮政业-' 这种值 行业2 也置为null when length(com_industry)-length(replace(com_industry,'-',''))=1 and length(substring_index(com_industry,'-',-1))=0 then null when length(com_industry)-length(replace(com_industry,'-',''))=1 then substring_index(com_industry,'-',-1) else substring_index(substring_index(com_industry,'-',2),'-',-1) end as com_industry2, case when length(com_industry)-length(replace(com_industry,'-',''))<=1 then null when length(com_industry)-length(replace(com_industry,'-',''))=2 then substring_index(com_industry,'-',-1) else substring_index(substring_index(com_industry,'-',3),'-',-1) end as com_industry3, case when length(com_industry)-length(replace(com_industry,'-',''))<=2 then null else substring_index(com_industry,'-',-1) end as com_industry4 from etl1_socom_data as a
select count(1) from s_socom_data union all select count(1) from etl1_socom_data union all select count(1) from etl2_socom_data
select * from etl2_socom_data where com_district is null and length(com_industry)-length(replace(com_industry,'-',''))=3
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有