2011年6月27日

SQL统计查询一个表中的记录,然后减法运算

摘要: 表的数据如下 :类型里1代表支出,2代表收入ID 支出/收入 金额 类型 时间1 支出1 100 1 2009年01月01日2 收入1 500 2 2009年5月12日3 支出3 200 1 2009年6月05日4 支出4 600 1 2009年7月06日5 收入2 1000 2 2009年10月21日1 --类型与金额都为 数字2 3 access:4 select sum(金额) -(select sum(金额) from 表 where 类型=1) from 表 where 类型=25 6 7 sql2000:8 select (sum(case 类型 when 2 then 金额 el 阅读全文

posted @ 2011-06-27 16:23 空白画映 阅读(11734) 评论(0) 推荐(1)

C#金额转换为汉字大写

摘要: public string MoneyToChinese(string LowerMoney) { string functionReturnValue = null; bool IsNegative = false; // 是否是负数 if (LowerMoney.Trim().Substring(0, 1) == "-") { // 是负数则先转为正数 LowerMoney = LowerMoney.Trim().Remove(0, 1); IsNegative = true; } string strLower = null; string strUpart = nu 阅读全文

posted @ 2011-06-27 14:34 空白画映 阅读(473) 评论(0) 推荐(0)

导航