Ver Mensaje Individual
  #4 (permalink)  
Antiguo 12/04/2010, 09:35
jurena
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Cáceres
Mensajes: 3.735
Antigüedad: 16 años, 1 mes
Puntos: 300
Respuesta: Extraer datos no coincidentes

Perdona el error, causado por el corta y pega. Prueba así:
Código MySQL:
Ver original
  1. SELECT codigo, nombre0, capacidad FROM elementos LEFT JOIN  (SELECT codigo FROM elementos INNER JOIN ocupacion ON codigo = id_item  
  2. WHERE the_date between @variablefechainicio AND @variablefechafin)T1 ON elementos.codigo=T1.codigo WHERE T1.codigo IS NULL ORDER BY elmentos.nombre0