문제

I want to find all employees from a company where the telephone number is NOT empty.

Now I have this:

db.GqlQuery('SELECT * FROM Employee '
       'WHERE company = :company '
       'AND phone > :nophone', company=company, nophone=None)

But this always prints out empty results although there are items with telephone number.

도움이 되었습니까?

해결책

try to use

db.GqlQuery('SELECT * FROM Employee  '
  'WHERE company = :company '
  'AND phone != :nophone', company=company, nophone=None)

read more about the operators here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top