摘要: 此文章仅仅是涉及到在select中的case when的用法:selecta,b,c,d,e,f --f字段可以同时出现,'LL'= ----LL 可以根据自己的需要变换casewhen f<50 then 'z' --涉及到小于when f between 50 and 80 then 'y' --涉及到小于,大于等于when f between 80 and 90 then 'x'else 'w' --大于90endfrom mmmorder by a --order by 可有可无 根据需要 阅读全文
posted @ 2013-01-03 11:17 笑看天下 阅读(32747) 评论(1) 推荐(2) 编辑
摘要: Dim idate as dateidate=Format(now,"yyyy/m/d") 阅读全文
posted @ 2013-01-03 09:14 笑看天下 阅读(26338) 评论(0) 推荐(1) 编辑
摘要: round(cast(a.SalesCNT as float)/cast(b.SalesCNT_Sum as float),10)先将整形转换成float型,相除后用round函数保留十位有效数字。 阅读全文
posted @ 2013-01-02 14:41 笑看天下 阅读(5205) 评论(0) 推荐(0) 编辑
摘要: 字符串连接:idate = Nowi = Year(idate)ii = Month(idate)iii = Day(idate)iiii = Hour(idate)LocalDate = b & " " & i & "年" & ii & "月" & iii & "日" & " " & iiii & "时"LocalDay = i & "年" & ii & 阅读全文
posted @ 2012-12-29 14:35 笑看天下 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 新建文件:ctrl+n关闭文件:ActiveWorkbook.SaveApplication.Quit锁屏:Application.ScreenUpdating = FalseApplication.ScreenUpdating = True覆盖同名文件: Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:= _ Application.DisplayAlerts = True 阅读全文
posted @ 2012-12-29 12:51 笑看天下 阅读(1740) 评论(0) 推荐(0) 编辑