SAS中MISSING和NULL的区别 [英] Difference between MISSING and NULL in SAS
问题描述
在SAS中,在WHERE子句中使用时,有什么区别
In SAS, while using in a WHERE clause, is there any differnece between
WHERE col1 is MISSING
对
WHERE col1 is NULL
你能解释一下 col1 是 char 和 col1 是 numeric 的情况吗?
Can you explain citing the case when col1 is char and when col1 is numeric?
推荐答案
WHERE col1 is NULL
和 WHERE col1 is MISSING
相同:SAS 在两者之间自由转换(文档将它们称为一个).两者都可以识别字符缺失、数字缺失和数字特殊缺失(.M
等).
WHERE col1 is NULL
and WHERE col1 is MISSING
are identical: SAS translates between the two freely (the documentation refers to them as one). Both pick up character missing, numeric missing, and numeric special missings (.M
etc.) fine.
请参阅 SAS 文档 有关 IS NULL
/IS MISSING
的更多具体信息.
See the SAS documentation for more specific information on IS NULL
/ IS MISSING
.
请注意,这仅适用于 SAS 端处理.如果您连接到其他类型的数据库/数据源(例如 Oracle、SQL Server 等),则这些不一定适用 - 即使您是在带有 LIBNAME 的 PROC SQL 中运行它.
Note that this is only true for SAS-side processing. If you're connected to another kind of database/data source (such as Oracle, SQL Server, etc.), these do not necessarily apply - even if you're running it in PROC SQL with a LIBNAME.
这篇关于SAS中MISSING和NULL的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!