健康一贴灵,专注医药行业管理信息化

07 2022 档案

摘要:1、Ms Sql Server SELECT getdate(); SELECT getdate()-90 ; -- 取90天前日期; select convert(varchar,getdate()-90,23); --转换为字符串,只取日期 SELECT year(getdate()); SEL 阅读全文
posted @ 2022-07-27 08:55 一贴灵 阅读(1402) 评论(0) 推荐(0)
摘要:--定义变量 1 a numeric; 方式一: 1 select sqla into a from table1 where b = '1' ; --这是sql语句赋值 方式二: 1 2 sql1:= 'select a from table1 where b = ' '1' ' '; execu 阅读全文
posted @ 2022-07-15 14:42 一贴灵 阅读(2394) 评论(0) 推荐(0)
摘要:select '202206' as yearmonth, c.name, sum(case when left(yearmonth,4) = left(to_char(to_date('202206','yyyymm') - interval '12 month','yyyymm'),4) and 阅读全文
posted @ 2022-07-12 16:52 一贴灵 阅读(58) 评论(0) 推荐(0)
摘要:查询员工ID select partner, bu_sort2,xdele,mc_name1 from but000 where bu_Group='Z005' string beginDate, endDate; //年月格式 :202201 beginDate = frmFlowWhere.Be 阅读全文
posted @ 2022-07-05 13:41 一贴灵 阅读(1389) 评论(0) 推荐(0)

学以致用,效率第一