假设我有一张桌子
A | B
===============
Dan | Jack
April | Lois
Matt | Davie
Andrew | Sally我想做一张桌子
C
======
Dan
April
Matt
Andrew
Jack
Lois
Davie
Sally使用SAS proc sql。我该怎么做呢?
发布于 2013-05-22 16:07:12
data have;
input A $ B $;
datalines;
Dan Jack
April Lois
Matt Davie
Andrew Sally
;
run;
proc sql;
create table want as
select A as name from have
union all
select B as name from have;
quit;发布于 2013-05-22 21:31:47
我知道您要求使用proc sql,但以下是如何使用数据步骤来实现它。我认为这样更简单:
data table2(keep=c);
set table1;
c = a;
output;
c = b;
output;
run;发布于 2013-07-27 17:18:51
proc sql;
create table combine as
select name
from one
union
select name
from two;
quit;https://stackoverflow.com/questions/16684703
复制相似问题