黎明前的黑暗
一切不行都是人不行
摘要: 1 var query = from t0 in context.ExpressSendMaster 2 join t1 in context.Supplier on t0.SupplierCode equals t1.SupplierCode 3 join t2 in context.Expres 阅读全文
posted @ 2017-01-11 16:35 无厘头的小情绪 阅读(2967) 评论(0) 推荐(0) 编辑
摘要: 一、创建表结构 二、添加测试数据 三、分页sql,下面例子是每页10条,取第31-40条数据。 四、SQL语句效率测试 1万:基本感觉不到差异 10万: 五、结论 1.max/top,ROW_NUMBER()都是比较不错的分页方法。相比ROW_NUMBER()只支持sql2005及以上版本,max/ 阅读全文
posted @ 2017-01-11 16:28 无厘头的小情绪 阅读(17956) 评论(0) 推荐(1) 编辑
摘要: 首先引用一个DynamicQueryable类 //Copyright (C) Microsoft Corporation. All rights reserved. using System; using System.Collections.Generic; using System.Text; 阅读全文
posted @ 2016-05-09 10:27 无厘头的小情绪 阅读(685) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System. 阅读全文
posted @ 2016-05-09 10:21 无厘头的小情绪 阅读(141) 评论(0) 推荐(0) 编辑
摘要: View Code 阅读全文
posted @ 2015-11-10 16:48 无厘头的小情绪 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 闪存首页新随笔管理订阅 Union All/Union/Intersect操作适用场景:对两个集合的处理,例如追加、合并、取相同项、相交项等等。Concat(连接)说明:连接不同的集合,不会自动过滤相同项;延迟。1.简单形式:varq = (fromcindb.Customersselectc.Ph... 阅读全文
posted @ 2015-10-20 16:58 无厘头的小情绪 阅读(248) 评论(0) 推荐(0) 编辑
摘要: http://hiscs.qxhcyy.com:82/install/https://support.microsoft.com/zh-cn/kb/2697990 阅读全文
posted @ 2015-09-29 11:57 无厘头的小情绪 阅读(327) 评论(0) 推荐(0) 编辑
摘要: if (list.Contains("全部")) { model.All = true; } var context = GetYWBusinessLogic().ObjectContext; var result = context.CustomerCommissionerView.Where(t... 阅读全文
posted @ 2015-09-17 17:48 无厘头的小情绪 阅读(358) 评论(0) 推荐(0) 编辑
摘要: select Id,CustomerCode,CustomerName,CreateId,CreateName,Phone,StatusName,(case when phone is not null and len(phone)=11 and SUBSTRING(phone,1,1)='1' t... 阅读全文
posted @ 2015-09-15 14:19 无厘头的小情绪 阅读(486) 评论(0) 推荐(0) 编辑
摘要: SELECT TOP 30000 REPLACE(REPLACE(T1.ReceiverName,CHAR(10),' '),CHAR(13),' ') AS ReceiverName,REPLACE(REPLACE(ReceiverCompany,CHAR(10),' '),CHAR(13),' ... 阅读全文
posted @ 2015-08-25 14:27 无厘头的小情绪 阅读(468) 评论(0) 推荐(0) 编辑