I have the following select statement

 SELECT Distinct lastname, firstname, UserName, r.name as 'Role', ug.name AS 'UserGroup'

and the following where statement

where userid = 894 and (EndDate > '2022-05-11 00:00:00' or endDate = 'NULL')

Getting the following error:

Conversion failed when converting character string to smalldatetime data type.

How do I fix this without entering a date/time in the Select statement?

0

There are 0 best solutions below