【发布时间】:2017-11-21 12:00:25
【问题描述】:
我在配置单元表列中有如下数据:
customer reason=Other#customer reason free text=Space#customer type=Regular#customer end date=2020-12-31 19:50:00#customer offering criterion=0#customer type=KK#Customer factor=0.00#customer period=0#customer type=TN#customer value=0#customer plan type=M#cttype type=KK#
我想根据客户价值提取数据值 0。
我尝试了下面的查询,但它给出了完整的“客户价值=0”,但我只想要 0。 请提出建议。
select regexp_replace(regexp_extract(information,'customer period=[^#]*',0),'customer period=','') from detail;
【问题讨论】:
-
数据有点难理解,因为这不是很常见的格式。独立行应该用“#”分隔吗?数据在字段方面是异构的吗?