回複:忘了說明一下,3和4中間有間斷,這種情況取most recent時間段。

來源: veggiedoggie 2009-11-06 10:53:49 [] [博客] [舊帖] [給我悄悄話] 本文已被閱讀: 次 (27 bytes)
回答: 你是否想要MAX BEGDATE和MAX ENDDATE?:-}---~2009-11-06 10:36:14
把下麵code裏的min改max行嗎?

所有跟帖: 

好像需要先加一個判斷,再決定用哪個. -小謀- 給 小謀 發送悄悄話 小謀 的博客首頁 (0 bytes) () 11/06/2009 postreply 11:01:29

你是要找出現最多的最老的日子把?那就複雜多了 -:-}---~- 給 :-}---~ 發送悄悄話 :-}---~ 的博客首頁 (31 bytes) () 11/06/2009 postreply 11:09:31

how to use IF statement in SQL, and compare the current -小謀- 給 小謀 發送悄悄話 小謀 的博客首頁 (32 bytes) () 11/06/2009 postreply 11:10:44

as long as i know, u can't use if in proc sql; -veggiedoggie- 給 veggiedoggie 發送悄悄話 veggiedoggie 的博客首頁 (0 bytes) () 11/06/2009 postreply 11:14:47

SQL不能比較current and previous record value -:-}---~- 給 :-}---~ 發送悄悄話 :-}---~ 的博客首頁 (33 bytes) () 11/06/2009 postreply 11:15:13

you can use case for if...then...else...if...then...else -:-}---~- 給 :-}---~ 發送悄悄話 :-}---~ 的博客首頁 (45 bytes) () 11/06/2009 postreply 11:18:27

高人呐,我趕緊做筆記,嗬嗬。 -veggiedoggie- 給 veggiedoggie 發送悄悄話 veggiedoggie 的博客首頁 (104 bytes) () 11/06/2009 postreply 11:27:00

說笑了,俺剛古狗來的:) -:-}---~- 給 :-}---~ 發送悄悄話 :-}---~ 的博客首頁 (0 bytes) () 11/06/2009 postreply 11:30:56

too complicated. -小謀- 給 小謀 發送悄悄話 小謀 的博客首頁 (0 bytes) () 11/06/2009 postreply 11:34:53

沒先謝謝人家? -眼冒金星- 給 眼冒金星 發送悄悄話 眼冒金星 的博客首頁 (0 bytes) () 11/06/2009 postreply 11:56:25

先謝了 -小謀- 給 小謀 發送悄悄話 小謀 的博客首頁 (0 bytes) () 11/06/2009 postreply 12:40:26

:) -眼冒金星- 給 眼冒金星 發送悄悄話 眼冒金星 的博客首頁 (0 bytes) () 11/06/2009 postreply 13:12:54

請您先登陸,再發跟帖!

發現Adblock插件

如要繼續瀏覽
請支持本站 請務必在本站關閉/移除任何Adblock

關閉Adblock後 請點擊

請參考如何關閉Adblock/Adblock plus

安裝Adblock plus用戶請點擊瀏覽器圖標
選擇“Disable on www.wenxuecity.com”

安裝Adblock用戶請點擊圖標
選擇“don't run on pages on this domain”