Fórum Como fazer em SQL ? #141312
26/02/2003
0
Caro amigos,
Tenho na minha tabela Candidato os seguintes campos:
COD_CONTROLE, DEFERIMENTO, PONTUACAO_A, PONTUACAO_B, PONTUACAO_C, PONTUACAO_D
Como fazer em sql um jeito onde todo o DEFERIMENTO = 0 que tiver algum campo PONTUACAO_A, PONTUACAO_B, PONTUACAO_C, PONTUACAO_D am branco eu possa trazer na tela.
Estou tentado o codigo abaixo no IBQuery mas está trazendo registro diferente de 0.
SELECT * FROM tcadidados
where DEFERIMENTO = 0 AND
PONTUACAO_A IS null OR
PONTUACAO_B IS null OR
PONTUACAO_C IS null OR
PONTUACAO_D IS null OR
Mantmor
Tenho na minha tabela Candidato os seguintes campos:
COD_CONTROLE, DEFERIMENTO, PONTUACAO_A, PONTUACAO_B, PONTUACAO_C, PONTUACAO_D
Como fazer em sql um jeito onde todo o DEFERIMENTO = 0 que tiver algum campo PONTUACAO_A, PONTUACAO_B, PONTUACAO_C, PONTUACAO_D am branco eu possa trazer na tela.
Estou tentado o codigo abaixo no IBQuery mas está trazendo registro diferente de 0.
SELECT * FROM tcadidados
where DEFERIMENTO = 0 AND
PONTUACAO_A IS null OR
PONTUACAO_B IS null OR
PONTUACAO_C IS null OR
PONTUACAO_D IS null OR
Mantmor
Anonymous
Curtir tópico
+ 0
Responder
Posts
26/02/2003
Torres Delphi
SELECT * FROM tcadidados
where DEFERIMENTO = 0 AND (
PONTUACAO_A IS null OR
PONTUACAO_B IS null OR
PONTUACAO_C IS null OR
PONTUACAO_D IS null OR ) --> Se algum dentro dos parenteses for verdadeiro, sera um acerto
where DEFERIMENTO = 0 AND (
PONTUACAO_A IS null OR
PONTUACAO_B IS null OR
PONTUACAO_C IS null OR
PONTUACAO_D IS null OR ) --> Se algum dentro dos parenteses for verdadeiro, sera um acerto
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)