摘要:
直接上例子.var wflist = from u in db.TWelFare where u.fy_no == fy_no orderby u.we_no group u by new { weno = u.we_no, wename = u.we_name } into g select new { g.Key.weno, g.Key.wename }; 阅读全文
摘要:
错误提示:在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: SQL Network Interfaces, error: 50 - 发生了 Local Database Runtime 错误。Cannot create an automatic instance. See the Windows Application event log for error details.)在vs里调试运行都正常,放到IIS里就出现请求数据库失败的情况;解决方法:找 阅读全文
摘要:
创建临时表 方法一: create table #临时表名(字段1 约束条件,字段2 约束条件,.....)create table ##临时表名(字段1 约束条件,字段2 约束条件,.....)方法二: select * into #临时表名 from 你的表; select * into ##临时表名 from 你的表;注:以上的#代表局部临时表,##代表全局临时表查询临时表 select * from #临时表名; select * from ##临时表名;删除临时表 drop table #临时表名; drop table ##临时表名;SQL SERVER临时表的使用http://w 阅读全文