由于数据库过大,我在编程的时候经常遇到运行空间不足的问题,也就是运行过程中产生的过程数据库太多,严重占用了临时空间。比如我现在想把每个客户的最早交易时间取出来,涉及到5个数据库的链接问题,用data步来做,然后用sql来取最早的交易时间。我现在想把data步和sql 步合并到一个程序里,以减少临时空间的利用,该如何编程呢?具体程序示例如下:
data trans;
set a1 a2 a3 a4 a5;
run;
proc sql;
create table trans2 as
select id,min(trans_time) as firsttranstime;
from trans;
quite;