I'm having issues using AND
/ LIKE
operators in select queries.
They seem to be greyed out, and, for instance, when executing a SELECT
query that has one or the other, or both included, no records are generated, even though records do exist within the database.
I have tried checking permissions, restarting the database instance - not really sure how to proceed at this point.
Assistance will be greatly appreciated. Many Thanks.
EDIT:
Example 1 - As you can see, this query shows two joined tables, which gives me relevant records:
Example 2 - Once I specify the date using the AND
Operator, and re-run the query, no records are generated, like none exist. This is the issue I'm experiencing.
There is not problem that LIKE predicate is grayed, I have this too.
You has define a two mutually exclusive conditions in the AND operator in your WHERE predicate - surely this will not work. You need an OR operator between mutually exclusive conditions in your predicate, like
WHERE <first predicate>
AND (Appointment.AppointmentDateTime ='20181102 10:00:00.000' OR
Appointment.AppointmentDateTime = '20181105 16:00:00.000')