看板 Statistics 關於我們 聯絡資訊
※ 引述《liton (歐吉桑留學生)》之銘言: : ※ 引述《tew (咖啡王子)》之銘言: : : proc sql; : : create table a : : as select a.comp_id, b.date : : from test a, test b : : where a.date>=b.date and : : (a.comp_id=1101 or a.comp_id=1102) : : order by comp_id,date; : : quit; 原PO下條件的時候 程式條件也就跟著一對一的寫出來了 不就兩個條件而已? '抓1101公司20090417前的日期' 與==>或 '抓1102公司20090612前的日期' 這問題各位怎會想的那麼複雜啊? proc sql; create table b as select * from test where (test.comp_id eq 1101 and test.date le '17Apr2009'd) '抓1101公司20090417前的日期' or (test.comp_id eq 1102 and test.date le '12Jun2009'd) '與抓1102公司20090612前的日期' order by comp_id,date; quit; -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.167.170.248