今天搭建linux的DNS主從服務器時遇到修改了/etc/resolv.conf之后,重啟系統或network后發現又恢復到以前的狀態。網上查了一下說是修改
摘要: 長度和語法分析 datalength(char_expr) 在char_expr中返回字符的長度值,忽略尾空 substring(expression,start,length) 返回部分字符串 right(char_expr,int_expr) 返回char_...
select isnull(convert(numeric(10,2), round(convert(numeric(10,0),x.ocr_file_num)/x.file_num * 100,2)),0)
where tr_date>= '2012-03-31' and tr_date <='2012-03-31')x
numeric(10,0) 10位數字 小數點后0位 ;
convert(numeric(10,0),x.ocr_file_num) 把x.ocr_file_num 轉為小數點后0位的10位數字;
round(a,b) 保留數字a小數點后b位小數;
select x.imp_type imp_type,isnull(y.un_auidted_num,0) un_auidted_num from
(select imp_type from imp_audit_type noholdlock where disp_sign=0 and tree_type=0 )x,(select imp_type,count(1) as un_auidted_num from imp_result noholdlock where 1=1
group by imp_type)y
noholdlock where x.imp_type *= y.imp_type order by x.imp_type
等價于
select x.imp_type imp_type,isnull(y.un_auidted_num,0) un_auidted_num from
(select imp_type from imp_audit_type noholdlock where disp_sign=0 and tree_type=0 )x left join (select imp_type,count(1) as un_auidted_num from imp_result noholdlock where 1=1
group by imp_type)y
noholdlock on x.imp_type = y.imp_type order by x.imp_type
where x.imp_type *= y.imp_type order by x.imp_type 相當于使用join的on條件;
通過在 select 或 readtext 命令中將 holdlock、noholdlock 和 shared 選項應用到單個表來替換某個會話的鎖定級別:
使用級別 關鍵字 作用
1 noholdlock 直到事務結束再持有鎖;在級別 3 使用以強制執行級別 1
2, 3 holdlock 持有共享鎖直到事務完成;在級別 1使用以強制執行級別 3
無 shared 在為更新操作打開游標時,對 select語句應用共享鎖而非更新鎖
批處理:
bcp db..ds_aptr in f:/ftproot/dataSource/20120418\ABIS-APTR-1G-20120418 -e E:\DataManager\error\ds_aptr20120418.txt -c -t"|!" -r"\n" -Uad -Shn -Pbj -Jcp936 -b10000
ds_aptr數據表 in導入 f:/ftproot/dataSource/20120418\ABIS-APTR-1G-20120418
-e E:\DataManager\error\ds_aptr20120418.txt 錯誤日志
-t"|!" 以|!為列的分隔符
-r"\n" 以\n為一條數據的分隔符
-Uad 用戶名ad
-Shn 服務器hn
-Pbj 密碼bj
-Jcp936 編碼cp936
-b10000 分批10000條提交