Re: [程式] 請問sas的多對多MERGE

看板Statistics作者 (咖啡王子)時間14年前 (2011/09/08 00:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/5 (看更多)
※ 引述《Justee (想像力)》之銘言: : 之前有板上強者提供了這個SQL code, : proc sql; : create table a as select * : from data1, data2 : where data1.code=data2.code; : quit; : 我都把資料放在我自己的library中, : 所以之前寫SAS時都會寫成library_A.data1或library_A.data2, : 但我寫成 library_A.data1.variable001=library_B.data2.variable001卻有問題, : 想請問如果想從另外建立的library(而非work檔)中抓出某一個data,從中使用variable, : 應該要怎麼寫呢? : 我現在是用 data set先複製一份data到work裡處理完再輸出到library裡, : 但我覺得好像有點多餘? 改成 from library_a.data1 a,library_a,data2 b where a.code=b.code; quit; 另外 proc datasets; 有copy 資料的語法 你可以自行研究看看 -- -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.36.200.2
文章代碼(AID): #1EPvo9p5 (Statistics)
討論串 (同標題文章)
文章代碼(AID): #1EPvo9p5 (Statistics)