Cloud SQL数据服务-查询空值

Cloud SQL数据服务-查询空值,cloud,ssds,sql-data-services,sql-server-data-services,Cloud,Ssds,Sql Data Services,Sql Server Data Services,这与Microsoft的SitkaSoapService有关,位于 我正在使用SitkaSoapServiceClient通过SOAP访问我的SQL数据服务数据库 我可以通过以字符串形式传递linq语句来查询数据,例如: Scope scope = new Scope(); scope.AuthorityId = authorityId; scope.ContainerId = containerId; using (SitkaSoapServiceClient proxy = GetProx

这与Microsoft的SitkaSoapService有关,位于

我正在使用SitkaSoapServiceClient通过SOAP访问我的SQL数据服务数据库

我可以通过以字符串形式传递linq语句来查询数据,例如:

Scope scope = new Scope();
scope.AuthorityId = authorityId;
scope.ContainerId = containerId;

using (SitkaSoapServiceClient proxy = GetProxy())
    return proxy.Query(scope, "from e in entities where e[\"FirstName\"] == \"Bob\" select e");
但是,我不知道如何查询空属性值,即查找没有该属性的实体

我希望能够说:

return proxy.Query(scope, "from e in entities where e[\"FirstName\"] == null select e");
。。。但这会引发FaultException,表示找不到名称“null”


有什么想法吗?

我不熟悉您正在尝试的服务,但T-SQL需要类似以下内容:

return proxy.Query(scope, "from e in entities where e[\"FirstName\"] IS null select e");

您可以像这样检查not null:

where e["FirstName"] >= ""
因此,空检查变为:

where !(e["FirstName"] >= "")
有点恶心,但它起作用了。也许有更好的方法,但我找不到