Select query unable to retrieve result

44 Views Asked by At

I have a query which on executing, gives the below error.

Conversion failed when converting date and/or time from character string.

The Query is

SELECT EMPLOYEE_NUMBER 
FROM PER_PERSON 
WHERE IS_ACTIVE = 'Y' 
AND '31-01-2022 00:00:00' 
BETWEEN EFF_START_DATE and ISNULL(EFF_END_DATE, '31-01-2022 00:00:00')  
AND ANALYST = (SELECT USERNAME FROM SEC_USER WHERE USER_ID = '100061')

Attaching screenshot for reference.

Screenshotsql

TIA

0

There are 0 best solutions below