|
|
楼主

楼主 |
发表于 2005-3-27 11:56:24
|
只看该作者
再问一个关于sql的having的问题
原来程序是这样的:
proc sql;
connect to oracle as a(user=a orapw=aa path=aaa);
create table a.sales as
select * from connection to a
(select anum,product,sales1,sales2,......sales12
from b.sales
where anum>0
group by anum, product
having sum( sales1 +
sales2 +
......
sales12 ) > 0
order by anum , product);
run;
然后我把having clause改成:
having sum(of sales1-sales12)>0
行不行呢?
用macro来实现的话又该怎样呢?
Thx!!! |
|