Обсуждение: Database can´t give the result of the query

Поиск
Список
Период
Сортировка

Database can´t give the result of the query

От
"Evandro"
Дата:
When I run this:
 
select c.cod_curriculo, c.mini_curriculo, c.tipo_curriculo, p.nome_pretensao from curriculo c, pretensao_profissional p, curriculo_pretensao cp, curriculo_pagamento cpag where cp.pretensao=p.cod_pretensao_profissional and c.cod_curriculo = cpag.curriculo and cp.curriculo=c.cod_curriculo and (c.mini_curriculo ilike '%gerente%' or p.nome_pretensao ilike '%gerente%') and flag_curriculo_ok='t' and flag_visivel='t' and cpag.data_vencimento >= '2002-01-22' and c.tipo_curriculo=1 Order by p.nome_pretensao limit 10, 0
 
But if I take out and c.tipo_curriculo=1
 
select c.cod_curriculo, c.mini_curriculo, c.tipo_curriculo, p.nome_pretensao from curriculo c, pretensao_profissional p, curriculo_pretensao cp, curriculo_pagamento cpag where cp.pretensao=p.cod_pretensao_profissional and c.cod_curriculo = cpag.curriculo and cp.curriculo=c.cod_curriculo and (c.mini_curriculo ilike '%gerente%' or p.nome_pretensao ilike '%gerente%') and flag_curriculo_ok='t' and flag_visivel='t' and cpag.data_vencimento >= '2002-01-22' Order by p.nome_pretensao limit 10, 0
 
Works fine...