Hi,
I am trying to use SQL to write a query that pulls patients that have not come in for their scheduled visit yet. The variable that has the scheduled date is "date_6m_sched" and the variable that would contain the actual visit date is "date_6m_actual". My current syntax won't pull any records, but I know there are at least 11. I want to be able to pull only the records missing before a certain date.
This is how I wrote it:
SELECT StudyID as [Study Number], hpv_group as [Study Group], date_6m_sched as [Scheduled Date], date_6m_actual as [Date Came],OtherComments As [Other Comments]
FROM [Tracking Log]
WHERE date_6m_actual = FALSE AND date_6m_sched <= [Enter Scheduled Date:]
Thanks,
cara