Código SQL:
Ver originalSELECT * FROM =clienteauto WHERE fecha_inicio_alquiler<>'2006-06-06' AND fecha_final_alquiler <>'2006-06-07'
u otro aproach
Código SQL:
Ver originalSELECT t1.* FROM clienteauto AS t1
LEFT JOIN (SELECT Fk_idCliente, Fk_matricula_auto FROM #clienteauto WHERE fecha_inicio_alquiler>='2006-06-06' AND fecha_final_alquiler <='2006-06-07') AS t2 ON (t1.Fk_idCliente=t2.Fk_idCliente AND t1.Fk_matricula_auto=t2.Fk_matricula_auto)
WHERE t2.Fk_matricula_auto IS NULL