由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - Help! proc sql;cout not null value.
相关主题
SAS Proc SQL count问题问个sql的问题吧,搞不出来了.
大牛请进,问个sas问题proc sql count(distinct XX) and count (unique xx)
[求助]count coverage days请教一个简单的SQL问题
我也来请教一个SAS问题请问SAS大牛一个关于proc sql join
如何删除重复的OBS?SAS Code 求助,如何把在另一个dataset的id找出来
sas问题觉得SAS array超难用
问一个数据库的题SQL find distinct values in large table (转载)
求教个SQL的问题keep group of values of SQL procedure in one table (转载)
相关话题的讨论汇总
话题: null话题: value话题: sql话题: sas话题: proc
进入Statistics版参与讨论
1 (共1页)
s******r
发帖数: 1524
1
I am using proc sql to count distinct value. However it sounds proc sql
count null value as well. Anybody has the idea how to handle it or it is
only a bug of SAS?
Thanks,
p********a
发帖数: 5352
2
It doesn't count null value
s******r
发帖数: 1524
3
So I wonder it is a bug of my SAS. It did count null value as well. I set
the value to '00'X. Maybe it is not a good way to assign null value?
Actually I run following code first
count(distinct case when A in ('01',,'02') then B else null end) as ...
However SAS took null as a variable instead value. So I used following code
instead
count(distinct case when A in ('01',,'02') then B else '00'x end)
The code works on oralce database but not on SAS. :(

【在 p********a 的大作中提到】
: It doesn't count null value
p********a
发帖数: 5352
4
SAS/SQL NE SQL
SAS/SQL doesn't recognize NULL or '00'x
It is taken as a value
p********a
发帖数: 5352
5
just replace '00'x as '', you will be fine
s******r
发帖数: 1524
6
'' works but I have to transfer variable A to character. :(
Thanks,

【在 p********a 的大作中提到】
: just replace '00'x as '', you will be fine
o****o
发帖数: 8077
7
can u use
case (when else) end
statement?

【在 s******r 的大作中提到】
: I am using proc sql to count distinct value. However it sounds proc sql
: count null value as well. Anybody has the idea how to handle it or it is
: only a bug of SAS?
: Thanks,

s*r
发帖数: 2757
8
why not set null values as missing
1 (共1页)
进入Statistics版参与讨论
相关主题
keep group of values of SQL procedure in one table (转载)如何删除重复的OBS?
关于SAS Advance 9 的考试体会sas问题
请教一sas code问一个数据库的题
SAS question:Please give me your suggestions!求教个SQL的问题
SAS Proc SQL count问题问个sql的问题吧,搞不出来了.
大牛请进,问个sas问题proc sql count(distinct XX) and count (unique xx)
[求助]count coverage days请教一个简单的SQL问题
我也来请教一个SAS问题请问SAS大牛一个关于proc sql join
相关话题的讨论汇总
话题: null话题: value话题: sql话题: sas话题: proc