摘要: 1.按年份分组 select to_char(exportDate,‘yyyy’),sum(amount) from table1 group by to_char(exportDate,‘yyyy’); 年份 数量 ----------------------------- 2009 68 2010 137 2008 103 2.按月份分组 select to_char(exportDate,‘yyyy-mm’),sum(amount) from table1 group by to_char(exportDate,‘yyyy-mm’) order by to_char(e... 阅读全文
posted @ 2013-05-07 09:53 微硬 阅读(1859) 评论(0) 推荐(0) 编辑
摘要: string strconn = "server=.;User Id=sa;Password=sa;database=数据库名;integrated security=true"; SqlConnection conn = new SqlConnection(strconn); conn.Open(); string sqlstr = "insert into table1(item1,item2... 阅读全文
posted @ 2010-06-21 17:04 微硬 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 在页面顶部添加: <style type="text/css"> #newPreview { FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)} </style> <script type="text/javascript" language="javascr... 阅读全文
posted @ 2010-06-21 16:45 微硬 阅读(882) 评论(1) 推荐(0) 编辑
摘要: 一个用于gridview分页代码一个公共类DataGridPagerusing System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls.WebParts;usin... 阅读全文
posted @ 2010-06-21 16:43 微硬 阅读(1001) 评论(0) 推荐(0) 编辑