摘要: --使用 from_unixtime 和 unix_timestamp 將時間列轉化成想要的格式
--然后再Insert表,動態指定分區
insert overwrite table partition_user_table partition (dt) select id, account, name, create_time, from_unixtime(unix_timestamp(create_time,'yyyy/mm/dd'),'yyyymmdd') as dt from external_user_table;
閱讀全文
posted @
2018-04-02 16:47 Ke 閱讀(545) |
評論 (0) |
編輯 收藏
摘要:
方法一:
1 var data, json;
2 json = '[{"id":"年計劃","text":"年計劃","selected":true}]';
3 data = $.parseJSON(json);
4 $("#rwlb").combobox("loadData", data);
方法二:
1 var data,json;
2 data = [];
3 data.push({ "text": "測試", "id": 100 });
4 $("#rwlb").combobox("loadData", data);
閱讀全文
posted @
2014-09-20 15:59 Ke 閱讀(4455) |
評論 (0) |
編輯 收藏
摘要: 十進制與十六進制的轉換
8i以上版本:
十進制-->十六進制
select to_char(100,'XX') from dual;
十六進制-->十進制
select to_number('7D','XX') from dual;
其中XX為格式,注意XX的位數不能小于傳入的參數。
閱讀全文
posted @
2014-07-30 17:35 Ke 閱讀(1433) |
評論 (0) |
編輯 收藏
摘要: with CTE as
(
-->Begin 一個定位點成員
select ID, Name,Parent,cast(Name as nvarchar(max)) as TE,
ROW_NUMBER()over(order by getdate()) as OrderID
--最關鍵是上面這個字段,要獲取排序字段,按字符串來排序。
--其中窗口函數必須要使用order by,但是不能用整型,那就用時間吧
from Tree where Parent is null
-->End
union all
-->Begin一個遞歸成員
select Tree.ID, Tree.Name,Tree.Parent,cast(replicate(' ',len(CTE.TE))+'|_'+Tree.name as nvarchar(MAX)) as TE,
<
閱讀全文
posted @
2014-07-17 14:46 Ke 閱讀(740) |
評論 (0) |
編輯 收藏
摘要: redhat 9.0,提示Determining IP information for eth0... failed; no link present. Check cable?無法激活網絡設備eth0
我搜的相關解決方案為:
到/etc/sysconfig/network-scripts/ifcfg-eth
/etc/sysconfig/networking/devices/ifcfg-eth 其中表示Ethernet adapter的標識數字,一般為0。當為零的時候,就是
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/networking/devices/ifcfg-eth0 這兩個文件中加入
check_link_down () {
return 1;
}
閱讀全文
posted @
2013-05-02 16:27 Ke 閱讀(1488) |
評論 (0) |
編輯 收藏