| Home | 最新文章 | 登入 | 申請網誌

久未露面


好久沒上來…

不過,最近自己確是沒什麼好寫…想寫的事沒有發生,有發生的又不想寫(又或忘記寫)

香港/中國/世界也多姿多采

  •  「截取通訊條例」通過
  • 程翔案一日審結,但未宣判
  • 架仔首相拜靖國神舍
  • 以巴戰爭
  • 十二大行星?!



按此回應 回應的RSS 暫時未有引用通告  (0)


大受歡迎


個 blog 三月開,現在已有超過九千八次點擊數字。兩家每日有超過二百次,明天應該過萬!!

全靠 google 同 yahoo…相信各 search engine 佔了當中九十八巴仙,加上自己又佔兩巴仙,剛好一百。




回應(1) 回應的RSS 暫時未有引用通告  (0)


Concatenate Columns in Different Rows


Question:

Consider the following table

create table t (
seq int,
seg varchar2(100)
);

Write a SQL to  concatenate the segments of the different rows to return a single string, where the order is specified in the seq column



(閱讀全文)


按此回應 回應的RSS 暫時未有引用通告  (0)


Detecting “Holes” in a Series


Question:

Consider the following table

create table t ( seq int ); 
While seq is supposed to be a continous series of figures, this is not the case. How to detect the range of “holes” within the data?

For example, assume t contain the following:

t
——-
1
2
6
8

The values indicating 3-5 and 7 should be returned.

The funny part in this question is that you need to return valuesoutside the data. But those data can be derived by the data easily 



(閱讀全文)


按此回應 回應的RSS 暫時未有引用通告  (0)


| 1