摘要: with T1 As (Select * From Table1)Select * From T1 where sex=1 Union All Select * From T1 where type=2 阅读全文
posted @ 2011-08-30 15:55 一个土豆一棵青菜 阅读(3457) 评论(0) 推荐(0) 编辑
摘要: 临时表与永久表相似,但临时表存储在 tempdb 中,当不再使用时会自动删除。临时表有两种类型:本地和全局。它们在名称、可见性以及可用性上有区别。本地临时表的名称以单个数字符号 (#) 打头;它们仅对当前的用户连接是可见的;当用户从 SQL Server 实例断开连接时被删除。全局临时表的名称以两个数字符号 (##) 打头,创建后对任何用户都是可见的,当所有引用该表的用户从 SQL Server 断开连接时被删除。来自这里:传送门select*into #d from tachecontractid --#d没有提前声明 insertinto #temp se... 阅读全文
posted @ 2011-08-30 15:52 一个土豆一棵青菜 阅读(260) 评论(0) 推荐(0) 编辑
摘要: int pc = 2; protected void Page_Load(object sender, EventArgs e) { //控制菜单 object obj = Request.QueryString["temp"]; if (obj == null) { ViewState["temp"] = 1; } else { ViewState["temp"] = obj; } Page.RegisterS... 阅读全文
posted @ 2011-08-30 15:34 一个土豆一棵青菜 阅读(252) 评论(0) 推荐(0) 编辑
摘要: //进入后台 即刷新页面function Q1Onclick(temp){ window.location.href="WXContract.aspx?temp="+temp;//temp(样式的id中的数字;完整版:wff1、wff2...)} //执行下边的jsPage.RegisterStartupScript("", "<script>yangshi("+temp+");</script>");//进去前台的方法 放在Page_Load里边//底下是读取数据呀什么的 //清空所有样式 阅读全文
posted @ 2011-08-30 11:42 一个土豆一棵青菜 阅读(1227) 评论(0) 推荐(1) 编辑
摘要: 在项目解决方案上右键 选择设置启动项目 然后选择你的网站而不是你的BLL DAL Model等........ 然后在login.aspx上右键设置启动页面 阅读全文
posted @ 2011-08-30 11:17 一个土豆一棵青菜 阅读(286) 评论(0) 推荐(0) 编辑
摘要: --得到总行数select count(proid) from (select distinct proid from tachecontractid where (empid=@uid or departid=@did) and state>2) as a--查询出来的时候插入到临时表 select * into #d from tachecontractid a where id=(select min(id) from (select* from tachecontractid where (departid=@did or empid=@uid) ... 阅读全文
posted @ 2011-08-30 10:07 一个土豆一棵青菜 阅读(158) 评论(0) 推荐(0) 编辑