I was using this query
query =
from appoint in Appointment,
join: event in assoc(appoint, :event),
where: event.profile_id == ^profile.id and fragment(“?::date”, appoint.datetime) == ^date
To get a few rows matching the date from the database. This query was working correctly using postgresql database but after switching to SQL server I get the following error:
** (Tds.Error) Line 1 (Error 243): Type a0.datetime is not a defined system type.