2013-06-25 195 views
0

我第一次來這裏:)Select * from A where(x,y)in(select x,y from B)

我發現很難相信SAS不支持上面的查詢。 這在Oracle中非常有用,現在我需要在SAS中使用類似的東西。

您能否建議一個簡單的解決方案來做到這一點?

非常感謝,

Gal。

+1

爲什麼你很難相信SAS SQL不支持非標準的語法? – Joe

回答

0

這是行不通的?

proc sql; 
    select a.* 
    from a, b 
    where a.x = b.x and a.y = b.y; 
quit; 
0

我認爲這應該工作

proc sql; 
    create table TABLENAME as 
    select a.*, b.x, b.y 
    from Table1 A left join Table2 B 
    on a.x = b.x 
     and a.y = b.y 
;quit; 
+0

酷!我會試一試。謝謝! :-) – user2518751

相關問題