摘要: PIVOT概述:PIVOT用于将列值旋转为列名(即行转列),并在必要时对最终输出中所需的任何其余列值执行聚合。 PIVOT的一般语法:SELECT [新表字段1,2,3…] FROM [原表名]AS [原表别名]PIVOT( [聚合函数] ( [原表字段1] ) FOR [原表字段2] IN ( [ 阅读全文
posted @ 2023-07-18 09:03 AaronLi 阅读(650) 评论(0) 推荐(0) 编辑
摘要: --练习:元件上展BOM IF EXISTS ( SELECT * FROM tempdb.dbo.sysobjects WHERE id = OBJECT_ID(N'tempdb.dbo.#temp_bom') ) --是否存在该临时表 DROP TABLE #temp_bom --存在则删除 C 阅读全文
posted @ 2023-04-21 13:34 AaronLi 阅读(90) 评论(0) 推荐(0) 编辑
摘要: --练习:往下展开BOM IF EXISTS ( SELECT * FROM tempdb.dbo.sysobjects WHERE id = OBJECT_ID(N'tempdb.dbo.#temp_bom') ) --是否存在该临时表 DROP TABLE #temp_bom --存在则删除 C 阅读全文
posted @ 2023-04-20 17:26 AaronLi 阅读(242) 评论(0) 推荐(0) 编辑
摘要: DECLARE @ItemCode VARCHAR(50) SET @ItemCode = '1,2,34,56,78,9,0' WHILE (CHARINDEX(',', @ItemCode) <> 0) BEGIN PRINT (SUBSTRING(@ItemCode, 1, CHARINDEX 阅读全文
posted @ 2023-04-19 13:45 AaronLi 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 转自:https://blog.csdn.net/lisheng19870305/article/details/126351901 -- 当月第一天select dateadd(month, datediff(month, 0, getdate()), 0) -- 当月最后一天(思路:下月的第一天 阅读全文
posted @ 2023-04-03 11:17 AaronLi 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 转自:https://www.likecs.com/show-307635043.html 1、Excel生成guid,uuid 格式:600d65bc-948a-1260-2217-fd8dfeebb1cd =LOWER(CONCATENATE(DEC2HEX(RANDBETWEEN(0,POWE 阅读全文
posted @ 2023-03-27 16:27 AaronLi 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-03-17 16:42 AaronLi 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 1.判断 正式表或者存储过程是否存在 select * from dbo.sysobjects where id=OBJECT_ID(N'dbo.Users') and type='U' --U表示表 select * from dbo.sysobjects where id= object_id( 阅读全文
posted @ 2023-02-02 09:42 AaronLi 阅读(187) 评论(0) 推荐(0) 编辑
摘要: int rowIndex; private void GroupHeader1_AfterPrint(object sender, System.EventArgs e) { rowIndex = 0; } private void tableCell1_PrintOnPage(object sen 阅读全文
posted @ 2022-10-17 15:04 AaronLi 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-10-08 15:50 AaronLi 阅读(108) 评论(0) 推荐(0) 编辑