Pergunta

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.

Foi útil?

Solução

try to use

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

read more about the operators here

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top