导航

2020年4月9日

摘要: 1 if exists( 2 select 3 exp_count 4 from 5 tbl_expend 6 where 7 exp_valid = 1 and exp_public = 0 and exp_monthly = 0 and convert(varchar(7),exp_date,1 阅读全文

posted @ 2020-04-09 11:04 竹子柱 阅读(116) 评论(0) 推荐(0) 编辑

2020年4月6日

摘要: if exists( select exp_count from tbl_expend where exp_valid = 1 and exp_public = 0 and exp_monthly = 0 and convert(varchar(7),exp_date,120) = convert( 阅读全文

posted @ 2020-04-06 21:58 竹子柱 阅读(901) 评论(0) 推荐(0) 编辑

2019年9月12日

摘要: --查消费金额select convert(varchar(7),exp_date,111) as 月份,count(exp_item) as 消费计数,sum(exp_price*exp_count) as 花费金额fromtbl_expend where convert(varchar(7),e 阅读全文

posted @ 2019-09-12 16:37 竹子柱 阅读(97) 评论(0) 推荐(0) 编辑

2019年4月28日

摘要: 申请空间并不初始化: void * malloc(num*sizeof(dataType)); memset(pointVar, initValue, size); //初始化,逐字节初始化。 申请空间并初始化为 0: void * calloc(num,sizeof(dataType)); 阅读全文

posted @ 2019-04-28 19:25 竹子柱 阅读(104) 评论(0) 推荐(0) 编辑

摘要: 二维数组形式 int (*nP1)[3]; nP1 =(int (*)[3]) malloc(24 * sizeof(int)); for (int i = 0; i < 3; i++) { for (int j = 0; j < 8; j++) { printf("%d ",nP1[i][j]); 阅读全文

posted @ 2019-04-28 18:53 竹子柱 阅读(157) 评论(0) 推荐(0) 编辑

2018年11月22日

摘要: 1 DECLARE @digital INT 2 SET @digital = 2 3 4 --截断小数位 5 SELECT CAST(CAST (15.33373333 *Power(10,@digital) as int)as decimal(15,6))/Power(10,@digital) AS 截断小数位 6 --上抛小数位 7 SELECT CAST(CE... 阅读全文

posted @ 2018-11-22 15:35 竹子柱 阅读(315) 评论(0) 推荐(0) 编辑

摘要: /*这个就是没有问题*/ 阅读全文

posted @ 2018-11-22 10:48 竹子柱 阅读(101) 评论(0) 推荐(0) 编辑

2018年10月18日

摘要: 1 SELECT TOP 200 2 PNo, IDENTITY( INT,1,1 ) AS sn 3 INTO 4 #temp1 5 FROM 6 tbl_test 7 8 SELECT 9 CASE WHEN sn = 10 11 AND sn = 100 THEN CONVERT(CHAR(3), sn) 1... 阅读全文

posted @ 2018-10-18 15:31 竹子柱 阅读(363) 评论(0) 推荐(0) 编辑

2018年10月14日

摘要: 1 //传入DataGridView 2 /// 3 /// 输出数据到Excel 4 /// 5 /// DataGridView 6 /// 是否包含字段名 7 /// 保存路径 8 /// 成功TRUE/失败FALSE 9 ... 阅读全文

posted @ 2018-10-14 19:39 竹子柱 阅读(697) 评论(0) 推荐(0) 编辑

摘要: 1 //要传一个DataSet,和若干个表 2 /// 3 /// 更新数据库 4 /// 5 /// 数据集 6 /// 数据表 7 /// -1:失败;-2:无可更新数据;其他:成功 8 public int UpdateDatabase(Dat... 阅读全文

posted @ 2018-10-14 19:36 竹子柱 阅读(151) 评论(0) 推荐(0) 编辑