上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 39 下一页
摘要: -- 指定时间增加带小数的天数 select day ,add_date_num ,cast(cast(day as bigint) + add_date_num * 24 * 60 * 60 as timestamp) as timestamp_new from ( select cast('2018-01-01' as timestamp) as da... 阅读全文
posted @ 2018-09-29 16:51 chenzechao 阅读(246) 评论(0) 推荐(0)
摘要: dos2unix * for i in `ls` do id=`echo ${i:0:2}` awk '{print tolower($0)}' "${i}"|grep -Eiw "from"|awk -F 'from' '{print $NF}'|grep -v "("|awk -F'.' '{print $NF}'|awk -v id=${id} '{print id... 阅读全文
posted @ 2018-09-19 17:39 chenzechao 阅读(314) 评论(0) 推荐(0)
摘要: cat >b <<EOF line1 line2 line3 EOF # 方法1 while read line do echo ${line} done < <(cat b) # 方法2 cat b|while read line do echo ${line} done # 方法3 while read line do echo ${lin... 阅读全文
posted @ 2018-09-19 16:14 chenzechao 阅读(621) 评论(0) 推荐(0)
摘要: ref:https://blog.csdn.net/trigl/article/details/68944434 阅读全文
posted @ 2018-09-12 10:22 chenzechao 阅读(248) 评论(0) 推荐(0)
摘要: Oozie使用的时候有以下不便: [a]Oozie调度的Workflow只能使用XML文件配置 [b]启动调度只能通过命令行 [c]无法通过Oozie界面调试调度脚本 [d]Oozie无法可视化调试脚本时候 [e]无法分组,权限管理等 阅读全文
posted @ 2018-09-12 10:08 chenzechao 阅读(654) 评论(0) 推荐(0)
摘要: ### 提取SQL语句 FILE_PATH="/data/SCRIPT" cat tables | while read file do echo "-----> ${file}" start=`grep -nEi "^insert|^with" ${FILE_PATH}/${file}|awk -F':' '{print $1}'|head -1` end=$(... 阅读全文
posted @ 2018-09-05 11:39 chenzechao 阅读(329) 评论(0) 推荐(0)
摘要: select t1.owner ,t1.table_name ,t1.column_id ,t1.column_name ,t1.data_type ,t2.comments from all_tab_columns t1 join all_col_comments t2 on t1.owner = t2.owner ... 阅读全文
posted @ 2018-08-31 14:33 chenzechao 阅读(235) 评论(0) 推荐(0)
摘要: 1 -- 当年/月/日累计指标数据初始化 2 with data_day as ( 3 select 'a' name,'2016-07-01' as day, 1 as value union all 4 select 'a' name,'2017-07-01' as day, 2 as value union all 5 select 'a' nam... 阅读全文
posted @ 2018-08-29 13:53 chenzechao 阅读(353) 评论(0) 推荐(0)
摘要: wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u141-b15... 阅读全文
posted @ 2018-08-22 12:26 chenzechao 阅读(912) 评论(0) 推荐(0)
摘要: 1 -- 根据指定日期找出前后30天内生日的客户 2 select 3 t2.day as etl_dt 4 ,t1.id 5 ,t1.day 6 ,t2.flag_first 7 ,t2.flag_last 8 ,concat(year(t1.day) - 1,t2.day_first) as day_first_1 9 ... 阅读全文
posted @ 2018-08-16 12:39 chenzechao 阅读(324) 评论(0) 推荐(0)
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 39 下一页