Jump to content
Sign in to follow this  
Gabriela Borin

Busca por data

Recommended Posts

Pessoal, bom dia!!

Estou tentando fazer uma SQL para buscar a quantidade de admissão de um determinado período. Porém gostaria que a data ficasse fixo, mas esta dando erro na hora de executar porque não esta entendendo o formato da data.

Alguém poderia me ajudar e corrigir essa SQL, por favor.

SELECT Count (PFUNC.DATAADMISSAO) AS ADMISSAO
FROM   PFUNC (NOLOCK)
WHERE  PFUNC.CODCOLIGADA = :COLIGADA
       AND PFUNC.DATAADMISSAO >= '01/06/2020'
       AND PFUNC.DATAADMISSAO <= '30/06/2020'

image.png.0e6f0d5a2cf5b5a68e11b85c97e55271.png

 

Share this post


Link to post
Share on other sites

Boa tarde.

Problema é o formato da data, provavelmente o campo exige data, horas, minutos, segundos.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.