- 博客(5)
- 收藏
- 关注
原创 HIve replace
replace select replace(a.f_value, ‘%20’, ’ ') f_value, a.vid from (select replace(lower(v.f_value), ‘%7c’, ‘|’) f_value, v.vid from mds_log_weblog_pageview v where v.dt >= ‘2020-06-09’ and v.dt < ‘2020-06-10’ and v.site in (‘www’, ‘wap’, ‘app’)) a .
2020-06-16 09:39:53
2021
原创 Hive --数据上传
HIve 数据上传 create external table temp.lyr_itemcode (itemcode string ) ROW FORMAT DELIMITED FIELDS TERMINATED BY ‘\009’ LINES TERMINATED BY ‘\n’ LOCATION ‘/user/liuyaru/itemcode’
2020-06-11 11:47:47
292
原创 HIve时间函数
HIve 时间函数 hive时间日期函数及典型场景应用 1、hive取得当前日期时间: 1.1) 取得当前日期: select current_date(); 1.2) 取得当前日期时间: select current_timestamp(); 1.3) hive取得当前时间戳: select unix_timestamp(); 1.4) 时间戳转日期: select from_unixtime(1517725479,‘yyyy-MM-dd HH:dd:ss’); 1.5) 日期转unix时间戳: sele
2020-06-11 11:46:05
15234
1
原创 Oracle分割
Oracle 分割 方法1 select T.DHPAY_ID, T.ORDERNO, trim(REGEXP_SUBSTR(ORDERNO, ‘[^,]+’, 1, level)) ORDERNO from (select d.DHPAY_ID, d.ORDERNO from FUND_PAYMENT_DHPAY d where d.response_code = ‘01’ and d.insertdate >= to_date(‘2019-06-01’, ‘yyyy-mm-dd’)) T conn
2020-06-11 11:39:56
1984
原创 Oracle数据库相关知识
Oracle写循环 declare VD_S date := to_date(‘20200214’, ‘yyyymmdd’); VD_E date := to_date(‘20200221’, ‘yyyymmdd’); VD_CURRENT date; begin VD_CURRENT := VD_S; while VD_CURRENT < VD_E loop insert into tmp_lyr_balance_a_7d select distinct VD_CURRENT
2020-06-11 11:37:32
193
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅