2011 年文章归档
共 3 篇文章
oracle中 start with connect by 用法
oracle 提供了start with connect by 语法结构可以实现递归查询。 1. 一个简单举例: SQL> select * from test; BILL_MONTH DAY_NUMBER MSISDN -------------------- ---------- -------------------- 200803 1 13800 200803 3 13800 200803 2 13800 200803 2 13801 200803 4 13804 200803 5 13804 200803 7 13804 200803 8 13804 200803 6 13802 …
2011-11-17 11:37 · SQL
Date、String、Calendar类型之间的转化
1.Calendar 转化 String //获取当前时间的具体情况,如年,月,日,week,date,分,秒等 Calendar calendat = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String dateStr = sdf.format(calendar.getTime()); 2.String 转化Calendar String str="2010-5-27"; SimpleDateFormat sdf= new SimpleDateFormat("yy…
2011-10-19 19:44
Oracle-使用wmsys.wm_concat把行转换成合并列
wmsys.wm_concat //数据库内部函数:把多行转换成一合并列 例如: select b.fchannel_id from sinocms_bindle_channel b where b.channel_id='1000000027' 结果: 1 1000000029 2 1000000030 3 1000000031 4 1000000032 5 1000000033 6 1000000034 把多行转换成一合并列 select wmsys.wm_concat(b.fchannel_id) from sinocms_bindle_channel b where b.channe…
2011-05-25 19:47