Use the correct prepared statement when there are no dates defined