如何用fql过滤null?

时间:2012-12-07 06:17:53

标签: facebook facebook-fql

select name, birthday 
from user 
where uid in (SELECT uid2 FROM friend WHERE uid1 = me()) 
    and birthday != null;

结果

{
  "error": {
    "message": "(#602) NULL is not a member of the user table.", 
    "type": "OAuthException", 
    "code": 602
  }
}

我可以以某种方式过滤掉空值吗?

2 个答案:

答案 0 :(得分:0)

这应该取出它在一年中获得普通字母时所用的所有空值

SELECT name, birthday, email, uid FROM user WHERE uid in (SELECT uid2 FROM friend WHERE uid1 = me()) AND (strpos(lower(birthday),"a") >=0 OR strpos(lower(birthday),"e") >=0 OR strpos(lower(birthday),"u") >=0) ORDER BY birthday_date

答案 1 :(得分:0)

无需使用str *函数...只需使用'where field '排除空值,或'where not field '排除非空值。对于这个特例:

选择姓名,生日 来自用户 生日那天 和uid in(SELECT uid2 FROM friend WHERE uid1 = me())