09 2010 档案

oracle11g 使用first_value获取表中不连接的ID号及掉失记录数量
摘要:[select * from city t order by t.city_id]如上图中数据显示的那样,现在要求 city_id 此表中不连接的的ID号。0 ~ 11 之间丢失的数据是 1 ~ 10丢失数量 1015 ~ 21 之间丢失的数据是 16 ~ 20丢失数量5.... ....显示出来的内容应该是lost_idlost_sum1~10,16~20 15最后如下图所示:现在使用sql 显示上面的信息select wm_concat(preced_id||'~'||last_id)lose_id,sum(last_id -preced_id + 1 ) lose_sum 阅读全文

posted @ 2010-09-14 17:14 小土泥 阅读(289) 评论(0) 推荐(0)

C中对 printf("%.*s/n",len,content) 的意思理解。
摘要:一直不明白是什么意思,问了别人才知道printf("%.*s/n",6,"aaaaaaaaa")是什么意思。 如:#include <stdio.h>#include <stdlib.h>int main(void){ char *content = "abcdefghijklmn"; printf("输出数据 :%.*s/n",5,content); printf("输出数据 :%.*s/n",strlen(content),content); return 0;}%. 阅读全文

posted @ 2010-09-02 11:06 小土泥 阅读(339) 评论(0) 推荐(0)

导航