mysql in 方法查询 按照 in队列里的顺序排序
摘要:String sql = "select comm,avg(price) from comm_saleprice where zone = ? and comm in (?,?,?,?,?,?,?,?) and price '0' GROUP BY comm " + "order by field(comm,?,?,?,?,?,?,?,?)"; ...
阅读全文
posted @
2016-12-29 10:35
山高似水深
阅读(333)
推荐(0) 编辑
根据身份证前2位判断属于哪个省
摘要:package com.sycx.domain; public class ProByIDcard { public static String GetPro(String word){ String pro = "错误身份证号"; if(word.equals("11")){ pro = "北京市"; ...
阅读全文
posted @
2016-12-28 10:25
山高似水深
阅读(444)
推荐(0) 编辑
java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
摘要:执行Hive查询: Console是这样报错的 如果把同样的sql放到hive shell里面执行 报错是上面这样的 一般出现这种情况,你去filecache 下面去找这个目录,是找不到的 原因可能是硬盘或者网络等原因 导致这个目录没有写入进去,删除filecache下面的所有文件夹,重启yarn
阅读全文
posted @
2016-12-23 11:44
山高似水深
阅读(21130)
推荐(0) 编辑
java中的三种取整函数
摘要:舍掉小数取整:Math.floor(3.5)=3 四舍五入取整:Math.rint(3.5)=4 进位取整:Math.ceil(3.1)=4 舍掉小数取整:Math.floor(3.5)=3 四舍五入取整:Math.rint(3.5)=4 进位取整:Math.ceil(3.1)=4
阅读全文
posted @
2016-12-15 17:53
山高似水深
阅读(315)
推荐(0) 编辑
mysql show status 参数解析
摘要:状态名 作用域 详细解释 Aborted_clients Global 由于客户端没有正确关闭连接导致客户端终止而中断的连接数 Aborted_connects Global 试图连接到MySQL服务器而失败的连接数 Binlog_cache_disk_use Global 使用临时二进制日志缓存但
阅读全文
posted @
2016-12-13 14:50
山高似水深
阅读(268)
推荐(0) 编辑
java获取多个汉字的拼音首字母
摘要:本文属于http://java.chinaitlab.com/base/803353.html原创!!! public class PinYin2Abbreviation { // 简体中文的编码范围从B0A1(45217)一直到F7FE(63486) private static int BEGIN = 45217; private static i...
阅读全文
posted @
2016-12-12 09:59
山高似水深
阅读(2660)
推荐(1) 编辑
sql 的积累
摘要:sql的积累 By:山高似水深 原创 转载注明出处 insert into table city_rank select city,num,company from(select city,count(distinct listings1)as num,company from salehouse
阅读全文
posted @
2016-12-05 11:32
山高似水深
阅读(228)
推荐(0) 编辑